mirror of
https://github.com/OMGeeky/flucto-heisskleber.git
synced 2025-12-27 14:59:23 +01:00
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.6.1 to 5.0.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4.6.1...v5.0.0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
56 lines
1.6 KiB
YAML
56 lines
1.6 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@v5.0.0
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Cache poetry install
|
|
uses: actions/cache@v4
|
|
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@v4
|
|
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 --cov
|
|
|
|
- name: Upload coverage roports to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
env:
|
|
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|