-
Notifications
You must be signed in to change notification settings - Fork 80
74 lines (62 loc) · 1.78 KB
/
python.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
name: Python tests
on:
push:
branches: [latest]
pull_request:
schedule:
- cron: "0 0 * * *" # daily
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-latest]
py: [3.9, 3.8, 3.7]
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v1
- name: Set up IPFS
if: startsWith(runner.os, 'Linux') && (matrix.py == '3.9')
uses: ibnesayeed/setup-ipfs@master
with:
ipfs_version: 0.6
run_daemon: true
- name: Start Redis
if: startsWith(runner.os, 'Linux') && (matrix.py == '3.9')
uses: supercharge/redis-github-action@4687e0c1d27b144de1dadc32967b7ce7e1227c7f
with:
redis-version: 6
- name: tox cache
uses: actions/cache@v2
with:
path: .tox/
key: ${{ runner.os }}-tox-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-tox-
- name: Test with tox
run: tox
env:
PYTHONDEVMODE: 1