-
Notifications
You must be signed in to change notification settings - Fork 118
56 lines (54 loc) · 1.61 KB
/
unit.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
name: Python Unit CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
platform: [ubuntu-latest, macos-latest, windows-latest]
# Python <= 3.9 is not available on macos-14
# Workaround for https://github.com/actions/setup-python/issues/696
exclude:
- platform: macos-latest
python: '3.9'
- platform: macos-latest
python: '3.8'
- platform: macos-latest
python: '3.7'
include:
- platform: macos-latest
python: '3.9'
- platform: macos-13
python: '3.8'
- platform: macos-13
python: '3.7'
runs-on: ${{ matrix.platform }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
auth.docker.io:443
files.pythonhosted.org:443
github.com:443
production.cloudflare.docker.com:443
pypi.org:443
registry-1.docker.io:443
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}
- name: Install tox
run: python -m pip install tox
- name: Test
run: python -m tox -e py-${{ matrix.platform }}