-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (57 loc) · 1.71 KB
/
ci_cron_weekly.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
# GitHub Actions workflow that runs on a cron schedule.
name: Cron Scheduled CI Tests
on:
schedule:
# run at 6am UTC on Mondays
- cron: '0 6 * * 1'
jobs:
# Testing links in documents is a good example of something to run on a schedule
# to catch links that stop working for some reason.
ci_tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Python 3.10 with minimal dependencies and coverage checking
os: ubuntu-latest
python: '3.10'
toxenv: py310-test-cov
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up python ${{ matrix.python }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox codecov
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
# This is an example of how to upload coverage to codecov
- name: Upload coverage to codecov
if: "endsWith(matrix.toxenv, '-cov')"
uses: codecov/[email protected]
with:
file: ./coverage.xml
doc_test:
name: 'Check docs links'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python to build docs with sphinx
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Check links in docs using tox
run: |
tox -e linkcheck