-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.19 KB
/
pr.yaml
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
name: pr
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
py: ['3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v3
- run: rye pin ${{ matrix.py }} # pin Python version
- run: rye sync
- run: |
diff=$(git diff requirements.lock)
if [[ -n $diff ]]; then
echo "requirements.lock file has changed:"
echo "$diff"
exit 1
else
echo "requirements.lock file has not changed"
fi
- run: rye fmt --check # check formatting is correct
- run: rye lint # and linting
- run: rye run check # typecheck too
- run: rye run test # then run your tests!
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: "junit/report.xml"
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml