-
Notifications
You must be signed in to change notification settings - Fork 44
73 lines (59 loc) · 2 KB
/
Copy pathmaster.yml
File metadata and controls
73 lines (59 loc) · 2 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Flask-mvc
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
# actions/checkout@v5 (93cb6efe18208431cddfb8368fd83d5badbf9bfd)
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Python
# actions/setup-python@v5 (a26af69be951a213d495a4c3e4e4022e16d87065)
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip
cache-dependency-path: requirements-test.txt
- name: Install lint dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Format check (black)
run: black --check --diff .
- name: Lint (ruff)
run: ruff check .
test:
name: Tests & coverage
runs-on: ubuntu-latest
needs: lint
steps:
# actions/checkout@v5 (93cb6efe18208431cddfb8368fd83d5badbf9bfd)
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Python
# actions/setup-python@v5 (a26af69be951a213d495a4c3e4e4022e16d87065)
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.14"
cache: pip
cache-dependency-path: requirements-test.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
- name: Run tests with coverage
env:
SECRET_KEY: ${{ secrets.SECRET_KEY || 'ci-test-secret-key-not-for-production' }}
run: pytest tests/ -v --cov=project --cov-branch --cov-report=xml
- name: Upload coverage to Codecov
# codecov/codecov-action@v6 (57e3a136b779b570ffcdbf80b3bdc90e7fab3de2)
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: false