-
Notifications
You must be signed in to change notification settings - Fork 11
53 lines (53 loc) · 1.34 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
name: Tests
on:
push:
branches:
- main
- '**'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- '*.txt'
pull_request:
branches:
- main
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- '*.txt'
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
APPDATA: DefaultNonExistingPath
strategy:
fail-fast: false
matrix:
include:
- {name: 3.10 Mac, python: '3.10', os: macos-latest, tox: py310}
- {name: 3.10 Linux, python: '3.10', os: ubuntu-latest, tox: py310}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: update pip
run: |
python -m pip install -U pip
- name: get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: cache pip
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('requirements/*.txt') }}
restore-keys: pip|${{ runner.os }}|${{ matrix.python }}
- run: pip install tox
env:
APPDATA: DefaultNonExistingPath
- run: tox -e ${{ matrix.tox }}