-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (69 loc) · 2.16 KB
/
tests.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# .github/workflows/tests.yml
name: Tests
on:
push:
branches:
- '*'
- '!gh-pages'
# Run on all branches except gh-pages
pull_request:
branches:
- '*'
- '!gh-pages'
# Run on all branches except gh-pages
permissions:
contents: read
jobs:
tests:
name: "Python $({ matrix.python-version }) tests"
runs-on: ubuntu-latest
env:
USING_COVERAGE: '3.10'
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # tag=v1.4
with:
egress-policy: block
allowed-endpoints: >
auth.docker.io:443
codecov.io:443
files.pythonhosted.org:443
github.com:443
production.cloudflare.docker.com:443
pypi.org:443
pyup.io:443
registry-1.docker.io:443
storage.googleapis.com:443
uploader.codecov.io:443
productionresultssa8.blob.core.windows.net:443
productionresultssa1.blob.core.windows.net:443
pipelinesghubeus25.actions.githubusercontent.com:443
docker.io:443
actions-results-receiver-production.githubapp.com:443
api.github.com:443
productionresultssa4.blob.core.windows.net:443
results-receiver.actions.githubusercontent.com:443
cli.codecov.io:443
- name: "Checkout"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
clean: true
- name: "Python setup"
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip install nox==2024.4.15
- run: pip install poetry==1.8.3
- run: pip install nox-poetry==1.0.2
- run: nox -p ${{ matrix.python-version }}
- name: "Post to codecov.io"
if: "contains(env.USING_COVERAGE, matrix.python-version)"
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false