-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.31 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Test Cookiecutter
on:
pull_request: {}
push:
branches: master
jobs:
test:
strategy:
matrix:
python-version: ['3.11', '3.12']
os: [ubuntu-latest]
name: Python ${{ matrix.os }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.6
- name: Install dependencies with poetry
run: poetry install
- run: poetry run ruff format hooks --check
- run: poetry run ruff check hooks
- run: poetry run mypy
- run: poetry run pytest --cov --cov-report=xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Default Name"
git config --global init.defaultBranch master
- name: Run cookiecutter
run: poetry run cookiecutter . --no-input --config-file template_config.yml
- name: Run pre-commit
run: cd poetry_project && poetry install && poetry run pre-commit run --all-files