diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..ee8979d --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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