correct event schedule type for tests #32
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
name: tests | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**/README.md' | |
- 'images/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install uv | |
uv venv | |
uv pip install -r requirements.txt -U | |
- name: Activate virtualenv | |
run: | | |
. .venv/bin/activate | |
echo PATH=$PATH >> $GITHUB_ENV | |
- name: Set env | |
run: echo "secret_csrf=$(openssl rand -hex 32)" >> $GITHUB_ENV | |
- name: Test with pytest | |
run: pytest --cov=app --cov-report=html tests/ | |
- name: Archive HTML coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-report | |
path: ./htmlcov |