-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e4fe69f
Showing
3,994 changed files
with
1,495,029 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
**/node_modules | ||
**/.env | ||
**/spec | ||
**/target | ||
build | ||
config | ||
docs | ||
jenkinsfile | ||
node_modules | ||
tests | ||
|
||
#Exclude specific files/folders | ||
!build/hana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[//]: # (When creating a new issue, please read our wiki first:) | ||
[//]: # (https://alp.atlassian.net/wiki/spaces/CS/pages/3554870121/How+to+report+bugs) | ||
[//]: # (Then, provide the following information:) | ||
|
||
**1. Summary**: | ||
**2. Steps to Reproduce**: | ||
**3. Your Expected Result**: | ||
**4. Actual Result**: | ||
**5. System Version**: | ||
**6. BCP/Customer Info**: | ||
|
||
|
||
[//]: # (Finally, add the *bug* label to the issue.) | ||
[//]: # (If you have further information about this bug being a candidate for the) | ||
[//]: # (current patch, please add the *patch candidate* label to it too.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### Merge Checklist | ||
|
||
Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out. | ||
|
||
- [ ] Automated Tests (Jasmine integration tests, Unit tests, and/or Performance tests) | ||
- [ ] Updated Manual tests / Demo Config | ||
- [ ] Documentation (Application guide, Admin guide, Markdown, Readme and/or Wiki) | ||
- [ ] Verified that local development environment is working with latest changes (integrated with latest `develop` branch) | ||
- [ ] following best practices in [code review doc](../code_review.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: ALP dataflow-gen unit tests | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, reopened, synchronize] | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
test-alp-dataflow-gen: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Install dependencies | ||
# protobuf-compiler required for python build dask-sql | ||
run: sudo apt-get install protobuf-compiler | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: dorny/paths-filter@v2 | ||
id: check_file_changed | ||
with: | ||
filters: | | ||
alp_dataflow_gen_changed: | ||
- 'services/alp-dataflow-gen/**' | ||
- name: Setup python if files have changed | ||
uses: actions/setup-python@v2 | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.alp_dataflow_gen_changed == 'True' | ||
with: | ||
python-version: 3.11.7 | ||
cache: 'pip' | ||
|
||
- name: Install pip packages if files have changed | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.alp_dataflow_gen_changed == 'True' | ||
working-directory: ./services/alp-dataflow-gen | ||
run: pip install -r requirements-dev.txt | ||
|
||
- name: Run unit tests if files have changed | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.alp_dataflow_gen_changed == 'True' | ||
working-directory: ./services/alp-dataflow-gen/pysrc | ||
run: python3 -m pytest -v --disable-pytest-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: ALP Dataflow unit tests | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, reopened, synchronize] | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
test-alp-dataflow: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: dorny/paths-filter@v2 | ||
id: check_file_changed | ||
with: | ||
filters: | | ||
dataflow_changed: | ||
- 'services/alp-dataflow/**' | ||
- name: Setup node if files have changed | ||
uses: actions/setup-node@v3 | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.dataflow_changed == 'True' | ||
with: | ||
node-version: '18.14.0' | ||
# Run the step only with "dataflow_changed" equals "True" | ||
- name: Run unit tests if files have changed | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.dataflow_changed == 'True' | ||
run: | | ||
cd services/alp-dataflow | ||
yarn --prefer-offline | ||
yarn build:lint | ||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: ALP DB Credentials unit tests | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, reopened, synchronize] | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
test-alp-db-credentials: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: dorny/paths-filter@v2 | ||
id: check_file_changed | ||
with: | ||
filters: | | ||
db_credentials_changed: | ||
- 'services/alp-db-credentials/**' | ||
- name: Setup node if files have changed | ||
uses: actions/setup-node@v3 | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.db_credentials_changed == 'True' | ||
with: | ||
node-version: '18.14.0' | ||
# Run the step only with "db_credentials_changed" equals "True" | ||
- name: Run unit tests if files have changed | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.db_credentials_changed == 'True' | ||
run: | | ||
cd services/alp-db-credentials | ||
yarn --prefer-offline | ||
yarn build:lint | ||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
name: ALP DB-Svc integration tests with Azure Hana database and local Postgres database | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, reopened, synchronize] | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
|
||
# Run only one job per branch | ||
concurrency: | ||
group: ${{ github.head_ref || github.ref_name }}-db-svc-tests # Run the latest push | ||
cancel-in-progress: true # Cancel in progress jobs of the workflow of the branch | ||
|
||
|
||
jobs: | ||
test-alp-db-svc: | ||
if: (github.ref_name == 'develop' || contains('release', github.ref_name) || github.event_name == 'workflow_dispatch') || ( github.event_name == 'pull_request' && !github.event.pull_request.draft ) # Should run if branch is develop/release/workflow_dispatch and doesnt have a PR | ||
runs-on: ubuntu-latest | ||
env: | ||
# DB-SVC ENV | ||
LB__LOG_LEVEL: "info" | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
DB_SVC__LOG_LEVEL: "error" | ||
DB_SVC__DEBUG: "false" | ||
DB_SVC__PORT: "3333" | ||
DB_SVC__PATH: "/alpdb" | ||
OMOP__VOCAB_SCHEMA: "CDMVOCAB" | ||
HANA__READ_ROLE: "TENANT_READ_ROLE" | ||
HANA__DRIVER_CLASS_PATH: "db/drivers/hana/ngdbc-latest.jar" | ||
POSTGRES__DRIVER_CLASS_PATH: "db/drivers/postgres/postgresql-42.3.1.jar" | ||
B2C__ALP_APP__CLIENT_ID: "30dccbb9-5705-483f-bbaf-1f7c8f0f4fce" | ||
AD__IDENTITY_METADATA: "https://login.microsoftonline.com/f59c7915-9283-4fb5-b633-435b9145ca00/v2.0/.well-known/openid-configuration" | ||
AD__AUDIENCE: "30dccbb9-5705-483f-bbaf-1f7c8f0f4fce, 3da7b194-8456-4ef1-a790-00ef6360decd" | ||
SKIP_AUTH: "TRUE" | ||
DISABLE_SSL: "TRUE" | ||
ROLLBACK_SCHEMA_CREATION_FOR_LIQUIBASE_SCRIPT_FAILURE: "TRUE" | ||
HANA__TENANT_CONFIGS: "{}" | ||
INTEGRATION_TEST__HANA__TENANT_CONFIGS: ${{ secrets.ALP_DB_SVC_INTEGRATION_TEST_HANA_TENANT_CONFIGS_GERMANY }} | ||
PG__TENANT_CONFIGS: '{"alp":{"host":"localhost","port":"5432","databaseName":"alp","postgresAdminUser":"postgres","postgresAdminPassword":"Toor1234","postgresReadUser":"postgres_tenant_read_user","postgresReadPassword":"Toor1234"}}' | ||
PG__READ_ROLE: "POSTGRES_TENANT_READ_ROLE" | ||
|
||
services: | ||
postgres: | ||
image: postgres:15-alpine | ||
env: | ||
POSTGRES_USER: "postgres" | ||
POSTGRES_PASSWORD: "Toor1234" | ||
POSTGRES_DB: "alp" | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/checkout@v4 | ||
name: sameBranch checkout (OverrideRepo) | ||
id: sameBranch-checkout | ||
continue-on-error: true | ||
with: | ||
repository: ${{ vars.OVERRIDE_REPO }} | ||
token: ${{ secrets.CI_PAT }} | ||
path: 'tmp' | ||
sparse-checkout: 'alp-data-node-override' | ||
sparse-checkout-cone-mode: false | ||
ref: ${{ env.BRANCH_NAME }} | ||
|
||
- shell: bash | ||
name: sameBranch checkout test | ||
id: sameBranch-checkout-test | ||
run: | | ||
ls -lhtr tmp | ||
[ -d tmp/alp-data-node-override ] || echo OVERRIDE_DEVELOP_BRANCH=true | tee -a "$GITHUB_OUTPUT" | ||
- uses: actions/checkout@v4 | ||
name: develop branch checkout (sameBranch checkout fails) | ||
if: steps.sameBranch-checkout-test.outputs.OVERRIDE_DEVELOP_BRANCH == 'True' | ||
with: | ||
repository: ${{ vars.OVERRIDE_REPO }} | ||
token: ${{ secrets.CI_PAT }} | ||
path: 'tmp' | ||
sparse-checkout: 'alp-data-node-override' | ||
sparse-checkout-cone-mode: false | ||
ref: develop | ||
|
||
- shell: bash | ||
name: merge files from override | ||
id: merge_files_from_override | ||
run: | | ||
ls -l tmp/alp-data-node-override | ||
cp -prnl ./tmp/alp-data-node-override/* . | ||
ls -l ./services/alp-db-svc/db/drivers | ||
ln -s tmp/alp-data-node-override alp-data-node-override | ||
- name: Install 1Password CLI | ||
uses: 1password/install-cli-action@v1 | ||
|
||
- name: Get alp-dbcli from 1password | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
run: | | ||
pwd | ||
mkdir -p internal/build | ||
op read --out-file internal/build/alp-dbcli-v1.0.0.tgz "op://${{ vars.OP_VAULT_NAME }}/alp-dbcli-v1.0.0.tgz/alp-dbcli-v1.0.0.tgz" | ||
ls -l internal/build | ||
- shell: bash | ||
# Give an id to the step, so we can reference it later | ||
name: check if files changed | ||
id: check_file_changed | ||
run: | | ||
# Fetch develop & get file changes from feature branch | ||
git fetch origin develop | ||
# Diff HEAD with the last commit of develop & filter for 'services/alp-db-svc/**' | ||
diff=$(git diff --name-only origin/develop HEAD | grep '^services/alp-db-svc/**' || :) | ||
# Check if a file under services/alp-db-svc/** has changed (added, modified, deleted) | ||
hasDiff=$(if [ ${#diff} -gt 0 ] ; then echo "True" ; else echo "False"; fi) | ||
# Set the output named "has_dbsvc_changed" | ||
echo "has_dbsvc_changed=$hasDiff" >> $GITHUB_OUTPUT | ||
echo "Files changed: $diff" | ||
echo "Does db-svc have changes: $hasDiff" | ||
- uses: actions/setup-node@v3 | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.has_dbsvc_changed == 'True' | ||
with: | ||
node-version: "18.14.0" | ||
|
||
- name: Build Project (DB-SVC) | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.has_dbsvc_changed == 'True' | ||
run: | | ||
# Build alp-libs dependencies for alp-db-svc | ||
yarn install --frozen-lockfile | ||
yarn workspace @alp/alp-base-utils run compile | ||
# Build alp-db-svc | ||
cd services/alp-db-svc | ||
yarn | ||
yarn compile | ||
- name: Setup Test DB (postgres) | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.has_dbsvc_changed == 'True' | ||
working-directory: ./services/alp-db-svc | ||
run: | | ||
# Create cdmvocab and cdmdefault schema for db-svc integration tests | ||
yarn workspace alp-db-svc cdm-install-script post /alpdb/postgres/database/alp/data-model/omop5-4/schema/cdmvocab "{\"cleansedSchemaOption\": false, \"vocabSchema\": \"${OMOP__VOCAB_SCHEMA}\"}" && yarn workspace alp-db-svc cdm-install-script post /alpdb/postgres/database/alp/data-model/omop5-4/schema/cdmdefault "{\"cleansedSchemaOption\": false, \"vocabSchema\": \"${OMOP__VOCAB_SCHEMA}\"}" | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.CI_GITHUB_PKGS_NPM_TOKEN }} | ||
|
||
- name: Run integration tests for DB-SVC POSTGRES | ||
working-directory: ./services/alp-db-svc | ||
# run only if files in 'has_dbsvc_changed' is set to 'True' | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.has_dbsvc_changed == 'True' | ||
run: | | ||
npm run pgtest | ||
- name: Run integration tests for DB-SVC HANA | ||
working-directory: ./services/alp-db-svc | ||
# run only if files in 'has_dbsvc_changed' is set to 'True' | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.has_dbsvc_changed == 'True' | ||
run: | | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: ALP Portal Server unit tests | ||
|
||
on: | ||
pull_request: | ||
types: [opened, ready_for_review, reopened, synchronize] | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
test-alp-portal-server: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: dorny/paths-filter@v2 | ||
id: check_file_changed | ||
with: | ||
filters: | | ||
portal_server_changed: | ||
- 'services/alp-portal-server/**' | ||
- name: Setup node if files have changed | ||
uses: actions/setup-node@v3 | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.portal_server_changed == 'True' | ||
with: | ||
node-version: '18.14.0' | ||
# Run the step only with "portal_server_changed" equals "True" | ||
- name: Run unit tests if files have changed | ||
if: github.ref_name == 'develop' || steps.check_file_changed.outputs.portal_server_changed == 'True' | ||
run: | | ||
cd services/alp-portal-server | ||
yarn --prefer-offline | ||
yarn build:lint | ||
yarn test |
Oops, something went wrong.