-
Notifications
You must be signed in to change notification settings - Fork 21
36 lines (36 loc) · 1.26 KB
/
run-unit-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
name: run-unit-tests
on: [push]
jobs:
run-pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9' ]
exclude: # Python < v3.8 does not support Apple Silicon ARM64.
- python-version: "3.7"
os: macos-latest
include: # So run those legacy versions on Intel CPUs.
- python-version: "3.7"
os: macos-13
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(python -m pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- run: python -m pip install .
- run: pip install -r requirements-dev.txt
- run: pytest