This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (82 loc) · 2.55 KB
/
ci_cron.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI - Cron
#########################
# Run Conditions
on:
schedule:
- cron: '0 6 * * 1' # run every Monday at 6am UTC
#########################
# Environment Variables
# TODO!
# env: # Set defaults to avoid repeating in most cases
# # By default, we run our jobs with 'ubuntu-latest'
# os: ubuntu-latest
#########################
# The Tests
jobs:
# job-id
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 10
matrix:
include:
# We check numpy-dev also in a job that only runs from cron, so that
# we can spot issues sooner. We do not use remote data here, since
# that gives too many false positives due to URL timeouts. We also
# install all dependencies via pip here so we pick up the latest
# releases.
- name: Python 3.7 with dev version of key dependencies
os: ubuntu-latest
python: 3.7
toxenv: py37-test-devdeps
- name: Documentation link check
os: ubuntu-latest
python: 3.7
toxenv: linkcheck
- name: Bundling with pyinstaller
os: ubuntu-latest
python: 3.8
toxenv: pyinstaller
# Test against Python dev in cron job.
- name: Python dev with basic dependencies
os: ubuntu-latest
python: 3.10-dev
toxenv: pydev-test
- name: Style check - black
os: ubuntu-latest
python: 3.8
toxenv: py38-black
- name: mypy check
os: ubuntu-latest
python: 3.8
toxenv: py38-mypy
- name: Unused code check
os: ubuntu-latest
python: 3.8
toxenv: py38-unused_code
steps:
# --------------------
# Setup
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install linkcheck dependencies
if: ${{ matrix.toxenv == 'linkcheck' }}
run: |
sudo apt-get install graphviz
sudo apt-get install pandoc
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox codecov
# --------------------
# Run Tests
- name: Run tests
run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}}