-
Notifications
You must be signed in to change notification settings - Fork 2
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
Egon Ferri
committed
Jul 24, 2024
1 parent
3eec5ad
commit 6b49dce
Showing
1 changed file
with
49 additions
and
0 deletions.
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,49 @@ | ||
name: CI Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Set up virtual environment | ||
run: python -m venv venv | ||
|
||
- name: Install dependencies | ||
run: | | ||
source venv/bin/activate | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run tests | ||
run: | | ||
source venv/bin/activate | ||
pytest --junitxml=report.xml --cov $PROJECT_PACKAGE test | ||
continue-on-error: true | ||
|
||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-report | ||
path: report.xml | ||
|
||
- name: Upload coverage report | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-report | ||
path: coverage.xml |