mirror of
https://github.com/OMGeeky/flucto-heisskleber.git
synced 2026-01-03 10:05:25 +01:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v4.6.1
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Cache poetry install
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.local
|
|
key: poetry-1.7.1-0
|
|
|
|
|
|
- name: Install poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: 1.7.1
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- name: cache deps
|
|
id: cache-deps
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: .venv
|
|
key: pydeps-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- run: poetry install --no-interaction --no-root
|
|
if: steps.cache-deps.outputs.cache-hit != 'true'
|
|
|
|
|
|
# Now install _your_ project. This isn't necessary for many types of projects -- particularly
|
|
# things like Django apps don't need this. But it's a good idea since it fully-exercises the
|
|
# pyproject.toml and makes that if you add things like console-scripts at some point that
|
|
# they'll be installed and working.
|
|
- run: poetry install --no-interaction
|
|
|
|
# And finally run tests. I'm using pytest and all my pytest config is in my `pyproject.toml`
|
|
# so this line is super-simple. But it could be as complex as you need.
|
|
- run: poetry run pytest
|