File tree Expand file tree Collapse file tree 2 files changed +96
-0
lines changed Expand file tree Collapse file tree 2 files changed +96
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run unit tests
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : [ main ]
7
+ tags :
8
+ workflow_dispatch :
9
+ schedule :
10
+ # Run every Sunday at 03:53 UTC
11
+ - cron : 53 2 * * 0
12
+
13
+ jobs :
14
+ tests :
15
+ runs-on : ${{ matrix.os }}
16
+ strategy :
17
+ fail-fast : false
18
+ matrix :
19
+ include :
20
+ - os : ubuntu-latest
21
+ python-version : 3.7
22
+ toxenv : py36-test-sphinx17
23
+ - os : windows-latest
24
+ python-version : 3.7
25
+ toxenv : py36-test-sphinx18
26
+ - os : macos-latest
27
+ python-version : 3.7
28
+ toxenv : py37-test-sphinx20
29
+ - os : ubuntu-latest
30
+ python-version : 3.8
31
+ toxenv : py37-test-sphinx24
32
+ - os : windows-latest
33
+ python-version : 3.8
34
+ toxenv : py38-test-sphinx30
35
+ - os : ubuntu-latest
36
+ python-version : 3.9
37
+ toxenv : py38-test-sphinx35
38
+ - os : ubuntu-latest
39
+ python-version : 3.9
40
+ toxenv : py39-test-sphinx40
41
+ - os : macos-latest
42
+ python-version : 3.9
43
+ toxenv : py38-test-sphinxdev
44
+
45
+ steps :
46
+ - uses : actions/checkout@v2
47
+ with :
48
+ fetch-depth : 0
49
+ - name : Set up Python ${{ matrix.python-version }}
50
+ uses : actions/setup-python@v2
51
+ with :
52
+ python-version : ${{ matrix.python-version }}
53
+ - name : Install Tox
54
+ run : python -m pip install tox
55
+ - name : Run Tox
56
+ run : tox -v -e ${{ matrix.toxenv }}
57
+
58
+ # - name: Slack Notification
59
+ # uses: 8398a7/action-slack@v3
60
+ # with:
61
+ # status: ${{ job.status }}
62
+ # env:
63
+ # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
64
+ # if: always() # TODO: cron
Original file line number Diff line number Diff line change
1
+ [tox]
2
+ envlist =
3
+ py{37,38,39}-test
4
+ codestyle
5
+ requires =
6
+ setuptools >= 30.3.0
7
+ pip >= 19.3.1
8
+ isolated_build = true
9
+
10
+ [testenv]
11
+ changedir = .tmp/{envname}
12
+ description = run tests
13
+ deps =
14
+ sphinx17: sphinx ==1.7.*
15
+ sphinx18: sphinx ==1.8.*
16
+ sphinx20: sphinx ==2.0.*
17
+ sphinx24: sphinx ==2.4.*
18
+ sphinx30: sphinx ==3.0.*
19
+ sphinx35: sphinx ==3.5.*
20
+ sphinx40: sphinx ==4.0.*
21
+ sphinxdev: git+https://github.com/sphinx-doc/sphinx# egg=sphinx
22
+
23
+ commands =
24
+ pip freeze
25
+ pytest {toxinidir}/tests {posargs}
26
+
27
+ [testenv:codestyle]
28
+ changedir =
29
+ skip_install = true
30
+ description = check code style, e.g. with flake8
31
+ deps = flake8
32
+ commands = flake8 sphinx_astropy --count
You can’t perform that action at this time.
0 commit comments