-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding testing pipline to the testing branch #1471
Adding testing pipline to the testing branch #1471
Conversation
Create main.yml
ldpa test
Update test.yml
Adding test-local for act and rename test
Fixing the issue of seeing env file
… into test-master
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not work. Depends if this template gets evaluated when github.event_name
is defined.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
If this works it will be great. Otherwise set this to false
.
on: | ||
pull_request: | ||
paths: | ||
- 'CodeListLibrary_project/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an on.
condition to handle when the PR gets merged into main
.
on:
push:
branches:
- main
paths:
- 'CodeListLibrary_project/**'
pull_request:
paths:
- 'CodeListLibrary_project/**'
You can later conditionally test if github.event_name == 'pull_request'
to run the steps for pushing to gh-pages only when this is a merge into main.
python manage.py runserver 0.0.0.0:8000 > /dev/null & | ||
|
||
- name: Run tests | ||
if: success() || failure() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove if
statement.
DISPLAY: ":99" | ||
|
||
- name: Coverage report | ||
if: success() || failure() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: always()
minimum_coverage: 25 | ||
|
||
- name: Upload Test Results | ||
if: success() || failure() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: always()
|
||
- name: Get Allure history | ||
uses: actions/checkout@v3 | ||
if: success() || failure() && github.event_name != 'pull_request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: always() && github.event_name != 'pull_request'
path: gh-pages | ||
|
||
- name: Allure report action # Step to generate Allure report | ||
if: success() || failure() && github.event_name != 'pull_request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: always() && github.event_name != 'pull_request'
|
||
- name: Upload an artifact for GitHub Pages | ||
uses: actions/upload-pages-artifact@v2 | ||
if: success() || failure() && github.event_name != 'pull_request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: always() && github.event_name != 'pull_request'
path: CodeListLibrary_project/clinicalcode/tests/allure-report | ||
|
||
- name: Deploy report to gh-pages branch | ||
if: always() && github.event_name != 'pull_request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if: always() && github.event_name != 'pull_request'
17a24e6
into
SwanseaUniversityMedical:test-pipline
A testing pipeline is going to be added to the test branch to see in the working environment.
There are currently implemented several features: