Files
daily-counter/.gitea/workflows/test.yaml
John Ahlroos 45cef42268
All checks were successful
Build & Release / build-docker-image (push) Has been skipped
Build & Release / deploy-to-production (push) Has been skipped
Run Tests / run-tests (push) Successful in 38s
Require tests pass before publishing new version
2026-05-02 13:12:54 +02:00

52 lines
1.5 KiB
YAML

name: Run Tests
on:
push: {}
workflow_dispatch:
env:
RUNNER_TOOL_CACHE: /toolcache
jobs:
run-tests:
runs-on: python
container:
image: catthehacker/ubuntu:act-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_JOHN_PRIVATE_KEY }}
- name: Setup Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
path: .venv
- name: Create virtual env
run: |
python3 -m venv .venv
. .venv/bin/activate
which python
python --version
python -m sqlite3 --version
- name: Install poetry
run: |
. .venv/bin/activate
pip install poetry==2.3.4
- name: Install the project dependencies
run: |
. .venv/bin/activate
poetry install
poetry env info
- name: Cache virtual env
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
path: .venv
- name: Run the automated tests
run: |
. .venv/bin/activate
poetry run pytest tests