2424 with :
2525 msg : |
2626 This branch is work on a ticket in the NHS Digital AMB JIRA Project. Here's a handy link to the ticket:
27- # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})
28- coverage :
29- runs-on : ubuntu-latest
30- steps :
31- - name : Checkout code
32- uses : actions/checkout@v2
33-
34- - name : Set up Python
35- uses : actions/setup-python@v3
36- with :
37- python-version : ' 3.10'
38-
39- - name : Set up AWS credentials
40- env :
41- AWS_ACCESS_KEY_ID : " FOOBARKEY"
42- AWS_SECRET_ACCESS_KEY : " FOOBARSECRET"
43- run : |
44- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
45- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
46-
47- - name : Install dependencies
48- run : |
49- pip install poetry moto==4.2.11 coverage redis botocore==1.35.49 simplejson responses structlog fhir.resources jsonpath_ng pydantic==1.10.13 requests aws-lambda-typing cffi pyjwt boto3-stubs-lite[dynamodb]~=1.26.90
50-
51- - name : Run unit tests and generate coverage report for filenameprocessor
52- run : |
53- mkdir -p /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/backend/coverage_html_report
54- coverage run -m unittest discover
55- coverage report
56- coverage xml -o /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/backend/coverage_html_report/test_coverage.xml
57- working-directory : " /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/backend"
58- continue-on-error : true
59-
60- - name : List coverage report file
61- run : |
62- ls -R /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/backend/coverage_html_report
63-
64- - name : Aggregate coverage reports
65- run : |
66- mkdir -p /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/coverage_html_report
67- rm -rf /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/coverage_html_report/*
68- mv /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/backend/coverage_html_report/test_coverage.xml /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/coverage_html_report/test_coverage.xml
69-
70- - name : Commit and push coverage reports
71- if : success()
72- run : |
73- git config --global user.name "github-actions[bot]"
74- git config --global user.email "github-actions[bot]@users.noreply.github.com"
75- git fetch origin ${{ github.head_ref }}
76- git checkout ${{ github.head_ref }}
77- git pull origin ${{ github.head_ref }}
78- git add /home/runner/work/immunisation-fhir-api/immunisation-fhir-api/coverage_html_report/*.xml
79- git commit -m "Add coverage index as XML format"
80- git push origin ${{ github.head_ref }}
27+ # [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})
0 commit comments