From f94657bdabf30e409d11c7a9d941c0f900e45b1f Mon Sep 17 00:00:00 2001 From: m-goggins Date: Fri, 11 Oct 2024 11:09:56 -0400 Subject: [PATCH 1/2] remove unneeded workflows --- .github/workflows/container-dibbs.yaml | 83 ---------- .github/workflows/container-ecr-viewer.yaml | 138 ---------------- .../workflows/container-fhir-converter.yaml | 124 --------------- .github/workflows/container-ingestion.yaml | 118 -------------- .../workflows/container-message-parser.yaml | 113 ------------- .../workflows/container-message-refiner.yaml | 113 ------------- .../workflows/container-orchestration.yaml | 149 ------------------ .../workflows/container-record-linkage.yaml | 94 ----------- .../container-trigger-code-reference.yaml | 112 ------------- .github/workflows/container-validation.yaml | 113 ------------- 10 files changed, 1157 deletions(-) delete mode 100644 .github/workflows/container-dibbs.yaml delete mode 100644 .github/workflows/container-ecr-viewer.yaml delete mode 100644 .github/workflows/container-fhir-converter.yaml delete mode 100644 .github/workflows/container-ingestion.yaml delete mode 100644 .github/workflows/container-message-parser.yaml delete mode 100644 .github/workflows/container-message-refiner.yaml delete mode 100644 .github/workflows/container-orchestration.yaml delete mode 100644 .github/workflows/container-record-linkage.yaml delete mode 100644 .github/workflows/container-trigger-code-reference.yaml delete mode 100644 .github/workflows/container-validation.yaml diff --git a/.github/workflows/container-dibbs.yaml b/.github/workflows/container-dibbs.yaml deleted file mode 100644 index ce91e9b6a..000000000 --- a/.github/workflows/container-dibbs.yaml +++ /dev/null @@ -1,83 +0,0 @@ -name: DIBBs Container Workflow - -on: - pull_request: - branches: - - "**" - paths: - - containers/dibbs/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: dibbs - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - pip install . - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-ecr-viewer.yaml b/.github/workflows/container-ecr-viewer.yaml deleted file mode 100644 index 0ca50305a..000000000 --- a/.github/workflows/container-ecr-viewer.yaml +++ /dev/null @@ -1,138 +0,0 @@ -name: Test ecr-viewer Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/ecr-viewer/** - - containers/fhir-converter/** - - packages/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - CONTAINER: ecr-viewer - NODE_VERSION: 18 # Adjust the Node.js version as needed - -jobs: - javascript-linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Lint javascript for ${{env.CONTAINER}} - working-directory: ./containers/${{env.CONTAINER}} - run: | - npm ci - npm run lint - test-node-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} # Navigate to your Node.js app directory - run: npm install - - name: Run tests - working-directory: ./containers/${{env.CONTAINER}} # Navigate to your Node.js app directory - run: npm test - cypress-e2e-tests: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} # Navigate to your Node.js app directory - run: npm install - - - name: Copy seed data - working-directory: ./containers/${{env.CONTAINER}} - run: cp ./cypress/assets/data.sql ./seed-scripts/sql - - - name: Start ${{env.CONTAINER}} - working-directory: ./containers/${{env.CONTAINER}} - run: docker compose --env-file .env.test up -d - - - name: Wait for server to be ready - run: | - until $(curl --output /dev/null --silent --head --fail http://localhost:3000/ecr-viewer); do - echo "Waiting for server to be ready..." - sleep 5 - done - - - name: Run cypress tests - working-directory: ./containers/${{env.CONTAINER}} - run: npm run cypress:run - lighthouse: - runs-on: ubuntu-latest - timeout-minutes: 20 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{env.NODE_VERSION}} - - - name: Build app - run: docker compose --env-file .env.test up -d - working-directory: ./containers/${{env.CONTAINER}} - - - name: Wait for Application to be ready - run: | - until curl --output /dev/null --silent --head --fail http://localhost:3000/ecr-viewer; do - printf '.' - sleep 5 - done - - - name: Run Lighthouse - uses: treosh/lighthouse-ci-action@v12 - with: - configPath: "./lighthouserc.yaml" - uploadArtifacts: true - - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Check Out Changes - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: . - file: ./containers/${{ env.CONTAINER }}/Dockerfile - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-fhir-converter.yaml b/.github/workflows/container-fhir-converter.yaml deleted file mode 100644 index 20e5ffb07..000000000 --- a/.github/workflows/container-fhir-converter.yaml +++ /dev/null @@ -1,124 +0,0 @@ -name: Test fhir-converter Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/fhir-converter/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: fhir-converter - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - integration-test-python-containers: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - name: Run integration tests for containers - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - unit-test-dotnet-fhir-converter: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup dotnet - uses: actions/setup-dotnet@v3 - with: - dotnet-version: "8.0.x" - - name: Run tests - working-directory: ./containers/${{env.CONTAINER}} - run: dotnet test - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-ingestion.yaml b/.github/workflows/container-ingestion.yaml deleted file mode 100644 index 5386e8ab4..000000000 --- a/.github/workflows/container-ingestion.yaml +++ /dev/null @@ -1,118 +0,0 @@ -name: Test ingestion Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/ingestion/** - - containers/dibbs/** - - containers/fhir-converter/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: ingestion - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - integration-test-python-containers: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - name: Run integration tests for containers - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max - build-args: | - "INGESTION_URL=${{secrets.INGESTION_URL}}" - "SMARTY_AUTH_ID=${{secrets.SMARTY_AUTH_ID}}" - "SMARTY_AUTH_TOKEN=${{secrets.SMARTY_AUTH_TOKEN}}" diff --git a/.github/workflows/container-message-parser.yaml b/.github/workflows/container-message-parser.yaml deleted file mode 100644 index 269366b4c..000000000 --- a/.github/workflows/container-message-parser.yaml +++ /dev/null @@ -1,113 +0,0 @@ -name: Test message-parser Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/message-parser/** - - containers/dibbs/** - - containers/fhir-converter/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: message-parser - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - integration-test-python-containers: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - name: Run integration tests for containers - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-message-refiner.yaml b/.github/workflows/container-message-refiner.yaml deleted file mode 100644 index 508d65b89..000000000 --- a/.github/workflows/container-message-refiner.yaml +++ /dev/null @@ -1,113 +0,0 @@ -name: Test message-refiner Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/message-refiner/** - - containers/dibbs/** - - containers/fhir-converter/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: message-refiner - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - integration-test-python-containers: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - name: Run integration tests for containers - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-orchestration.yaml b/.github/workflows/container-orchestration.yaml deleted file mode 100644 index 7ce71c833..000000000 --- a/.github/workflows/container-orchestration.yaml +++ /dev/null @@ -1,149 +0,0 @@ -name: Test orchestration Container - -on: - pull_request: - branches: - - "**" - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: orchestration - -jobs: - orchestration-python-linting: # This job is the same as the python-linting job in linting-python.yaml but does not run if using linting-python.yaml - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install dependencies - run: | - pip install -U pip - pip install ruff==0.4.3 - - name: Run linter (ruff) - run: | - ruff check --output-format=github . - - name: Run formatter (ruff) - run: | - ruff format --check - orchestration-unit-test-python: - runs-on: ubuntu-latest - services: - test-db: - image: postgres:13-alpine3.16 - env: - POSTGRES_PASSWORD: pw - POSTGRES_DB: testdb - POSTGRES_USER: postgres - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - --name testdb - ports: - - 5432:5432 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - orchestration-integration-test-python: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run integration tests for containers - env: - MPI_DBNAME: testdb - MPI_PASSWORD: pw - MPI_DB_TYPE: postgres - MPI_HOST: localhost - MPI_USER: postgres - MPI_PORT: 5432 - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - build-orchestration-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max - build-args: | - "INGESTION_URL=${{secrets.INGESTION_URL}}" - "MESSAGE_PARSER_URL=${{secrets.MESSAGE_PARSER_URL}}" - "SMARTY_AUTH_ID=${{secrets.SMARTY_AUTH_ID}}" - "SMARTY_AUTH_TOKEN=${{secrets.SMARTY_AUTH_TOKEN}}" diff --git a/.github/workflows/container-record-linkage.yaml b/.github/workflows/container-record-linkage.yaml deleted file mode 100644 index 80c687ed4..000000000 --- a/.github/workflows/container-record-linkage.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: Test record-linkage Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/record-linkage/** - - containers/dibbs/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: record-linkage - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - unit-test-python-containers: - runs-on: ubuntu-latest - services: - test-db: - image: postgres:13-alpine3.16 - env: - POSTGRES_PASSWORD: pw - POSTGRES_DB: testdb - POSTGRES_USER: postgres - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - --name testdb - ports: - - 5432:5432 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-trigger-code-reference.yaml b/.github/workflows/container-trigger-code-reference.yaml deleted file mode 100644 index 8e6db6ae7..000000000 --- a/.github/workflows/container-trigger-code-reference.yaml +++ /dev/null @@ -1,112 +0,0 @@ -name: Test trigger-code-reference Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/trigger-code-reference/** - - containers/dibbs/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: trigger-code-reference - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" . - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - integration-test-python-containers: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - name: Run integration tests for containers - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/container-validation.yaml b/.github/workflows/container-validation.yaml deleted file mode 100644 index 46b3f3de4..000000000 --- a/.github/workflows/container-validation.yaml +++ /dev/null @@ -1,113 +0,0 @@ -name: Test validation Container - -on: - pull_request: - branches: - - "**" - paths: - - containers/validation/** - - containers/dibbs/** - - containers/fhir-converter/** - merge_group: - types: - - checks_requested - push: - branches: - - main - paths-ignore: - - pyproject.toml - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TEST_RUNNER_PYTHON_VERSION: 3.11 - CONTAINER: validation - -jobs: - python-linting: - uses: ./.github/workflows/linting-python.yaml - with: - python_runner_version: 3.11 # must be hardcoded; cannot pass in from env - unit-test-python-containers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest and pytest-cov - run: pip install pytest pytest-cov - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - run: | - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Run unit tests for container with coverage - working-directory: ./containers/${{env.CONTAINER}} - run: | - python -m pytest --cov-report xml --cov=. -m "not integration" tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: ${{ env.CONTAINER }} - integration-test-python-containers: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup python ${{env.TEST_RUNNER_PYTHON_VERSION}} - uses: actions/setup-python@v5 - with: - python-version: ${{env.TEST_RUNNER_PYTHON_VERSION}} - cache: pip - - name: Install pytest - run: pip install pytest - - name: Install dependencies - working-directory: ./containers/${{env.CONTAINER}} - # When running as a PR check, instead of importing the SDK from @main, - # import it from the current commit. (Need to do this for all containers) - run: | - if [[ $GITHUB_REF != "refs/heads/main" ]]; then - commit_hash=$(git rev-parse HEAD) - find ./ -name requirements.txt -exec sed -i -e "s/phdi@main/phdi@${commit_hash}/g" {} \; - fi - pip install -r requirements.txt - if [ -f dev-requirements.txt ]; then - pip install -r dev-requirements.txt - fi - - name: Install Docker Compose - run: | - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - name: Run integration tests for containers - working-directory: ./containers/${{env.CONTAINER}}/tests/integration - run: | - python -m pytest -m "integration" - build-container: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Build ${{ env.CONTAINER }} Container - uses: docker/build-push-action@v3 - with: - context: ./containers/${{ env.CONTAINER }} - push: false - cache-from: type=gha - cache-to: type=gha,mode=max From 155c908df45dc80d05908729f284a3ebf3ffd2c7 Mon Sep 17 00:00:00 2001 From: m-goggins Date: Fri, 11 Oct 2024 11:11:58 -0400 Subject: [PATCH 2/2] run tefca tests always --- .github/workflows/container-tefca-viewer.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/container-tefca-viewer.yaml b/.github/workflows/container-tefca-viewer.yaml index f4281f5f3..24e19a93c 100644 --- a/.github/workflows/container-tefca-viewer.yaml +++ b/.github/workflows/container-tefca-viewer.yaml @@ -4,8 +4,6 @@ on: pull_request: branches: - "**" - paths: - - containers/tefca-viewer/** merge_group: types: - checks_requested