44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install pytest pytest-cov
|
|
|
|
- name: Run tests
|
|
working-directory: tests
|
|
run: python -m pytest -v --cov=da_stash --cov=da_publish --cov-report=xml --cov-report=html --cov-report=term
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: tests/coverage.xml
|
|
fail_ci_if_error: false
|
|
|
|
- name: Upload coverage artifacts
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: coverage-report
|
|
path: |
|
|
tests/coverage.xml
|
|
tests/htmlcov
|