foxhole/.forgejo/workflows/test.yml

29 lines
767 B
YAML
Raw Permalink Normal View History

2024-02-26 14:27:11 +01:00
on: [push]
jobs:
2024-02-26 14:57:14 +01:00
run-pytest:
2024-02-26 14:27:11 +01:00
container:
2024-09-29 18:33:48 +02:00
image: nikolaik/python-nodejs:python3.12-nodejs22
2024-02-26 14:27:11 +01:00
steps:
- uses: actions/checkout@v3
- name: Restore poetry project dependencies
uses: actions/cache/restore@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install poetry
run: |
pip install poetry
- name: Run test
run: |
poetry install --no-root
2024-02-26 14:57:14 +01:00
poetry run pytest --envfile .env.test -vvv
2024-02-26 14:27:11 +01:00
- name: Cache poetry project dependencies
uses: actions/cache/save@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}