docker load response #2432
This file contains hidden or 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
| name: SonarCloud | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [labeled, opened, synchronize, reopened, unlabeled] | |
| jobs: | |
| sonarcloud: | |
| name: SonarCloud | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install poetry | |
| run: pip install poetry==1.8.4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: | | |
| 3.10 | |
| 3.11 | |
| cache: 'poetry' | |
| - name: Set up AWS credentials | |
| env: | |
| AWS_ACCESS_KEY_ID: "FOOBARKEY" | |
| AWS_SECRET_ACCESS_KEY: "FOOBARSECRET" | |
| run: | | |
| aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID | |
| aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY | |
| - name: Run unittest with filenameprocessor-coverage | |
| working-directory: filenameprocessor | |
| id: filenameprocessor | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.10 | |
| poetry install | |
| poetry run coverage run -m unittest discover || echo "filenameprocessor tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-coverage-filenameprocessor-coverage.xml | |
| - name: Run unittest with recordprocessor-coverage | |
| working-directory: recordprocessor | |
| id: recordprocessor | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.10 | |
| poetry install | |
| poetry run coverage run -m unittest discover || echo "recordprocessor tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-coverage-recordprocessor-coverage.xml | |
| # This step is redundant - all of these tests will be run in the backend step below | |
| - name: Run unittest with recordforwarder-coverage | |
| working-directory: backend | |
| id: recordforwarder | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.11 | |
| poetry install | |
| poetry run coverage run -m unittest discover -s "./tests" -p "*batch*.py" || echo "recordforwarder tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-coverage-recordforwarder-coverage.xml | |
| - name: Run unittest with coverage-ack-lambda | |
| working-directory: ack_backend | |
| id: acklambda | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.10 | |
| poetry install | |
| poetry run coverage run -m unittest discover || echo "ack-lambda tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-coverage-ack-lambda.xml | |
| - name: Run unittest with coverage-delta | |
| working-directory: delta_backend | |
| id: delta | |
| env: | |
| PYTHONPATH: delta_backend/src:delta_backend/tests | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.11 | |
| poetry install | |
| poetry run coverage run -m unittest discover || echo "delta tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-coverage-delta.xml | |
| - name: Run unittest with coverage-fhir-api | |
| working-directory: backend | |
| id: fhirapi | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.11 | |
| poetry install | |
| poetry run coverage run -m unittest discover || echo "fhir-api tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-coverage.xml | |
| - name: Run unittest with coverage-mesh-processor | |
| working-directory: mesh_processor | |
| id: meshprocessor | |
| continue-on-error: true | |
| run: | | |
| poetry env use 3.10 | |
| poetry install | |
| poetry run coverage run -m unittest discover || echo "mesh_processor tests failed" >> ../failed_tests.txt | |
| poetry run coverage xml -o ../sonarcloud-mesh_processor-coverage.xml | |
| - name: Run Test Failure Summary | |
| id: check_failure | |
| run: | | |
| if [ -s failed_tests.txt ]; then | |
| echo "The following tests failed:" | |
| cat failed_tests.txt | |
| while IFS= read -r line; do | |
| echo "##[error]Test Failures: $line" | |
| done < failed_tests.txt | |
| exit 1 | |
| else | |
| echo "All tests passed." | |
| fi | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |