-
Notifications
You must be signed in to change notification settings - Fork 132
57 lines (48 loc) · 1.37 KB
/
tox_checks.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
# NB: this name is used in the status badge
name: tox checks
on:
push:
branches:
- master
- dev
- 'release/**'
pull_request:
workflow_dispatch:
schedule:
- cron: "0 5 * * 6" # 5:00 UTC every Saturday
jobs:
lint:
name: ${{ matrix.toxenv }}
runs-on: ubuntu-latest
strategy:
matrix:
toxenv:
- clean
- check
- docs
steps:
- name: Update package list
run: sudo apt update
- name: Install LaTeX
run: sudo apt install dvipng rubber texlive-latex-extra
- name: Git clone
uses: actions/checkout@v2
- name: Set up Python ${{ env.default_python || '3.9' }}
uses: actions/setup-python@v5
with:
python-version: "${{ env.default_python || '3.9' }}"
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini', 'setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools wheel build
python -m pip install -U tox
- name: Run ${{ matrix.toxenv }}
run: python -m tox -e ${{ matrix.toxenv }}