Skip to content

Commit

Permalink
feat: CI workflow that runs test
Browse files Browse the repository at this point in the history
  • Loading branch information
Egon Ferri committed Jul 24, 2024
1 parent 3eec5ad commit 9580e4b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yaml
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 test --cov-report=xml
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

0 comments on commit 9580e4b

Please sign in to comment.