Lee93whut commited on
Commit
c08fcb7
·
1 Parent(s): fe0625d

ci: GitHub Actions — pytest + 90%+ branch coverage gate

Browse files

- Trigger: push/PR to master
- Python 3.10, pip cache via actions/cache@v4
- pip install -e ".[dev]" + requirements.txt
- pytest with --cov-fail-under=90
- Coverage report: term-missing + HTML + XML

Files changed (1) hide show
  1. .github/workflows/test.yml +34 -0
.github/workflows/test.yml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main", "master"]
6
+ pull_request:
7
+ branches: ["main", "master"]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.10"
19
+
20
+ - name: Cache pip
21
+ uses: actions/cache@v4
22
+ with:
23
+ path: ~/.cache/pip
24
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'pyproject.toml') }}
25
+ restore-keys: ${{ runner.os }}-pip-
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ pip install --upgrade pip
30
+ pip install -e ".[dev]"
31
+ pip install -r requirements.txt
32
+
33
+ - name: Run tests
34
+ run: pytest