1
+ name : CI
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 22 * * *'
6
+ pull_request :
7
+ branches : [ master ]
8
+ types : [ opened, synchronize, reopened, ready_for_review ]
9
+ # Required for manual triggering
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ test :
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ include :
19
+ - python-version : " 3.8"
20
+ os : ubuntu-20.04
21
+ piplist : " numpy matplotlib"
22
+ - python-version : " 3.9"
23
+ os : ubuntu-20.04
24
+ piplist : " numpy matplotlib"
25
+ dep-strategy : " oldest"
26
+ - python-version : " 3.10"
27
+ os : ubuntu-20.04
28
+ piplist : " numpy matplotlib"
29
+ - python-version : " 3.10"
30
+ os : ubuntu-20.04
31
+ piplist : " numpy matplotlib spacepy"
32
+ steps :
33
+ - name : Set up Python ${{ matrix.python-version }}
34
+ uses : actions/setup-python@v2
35
+ with :
36
+ python-version : ${{ matrix.python-version }}
37
+ - name : Install dependencies
38
+ env :
39
+ PIPLIST : ${{ matrix.piplist }}
40
+ run : |
41
+ sudo apt-get update -qq
42
+ python -m pip install --upgrade pip
43
+ pip freeze
44
+ # Per https://github.com/actions/checkout/issues/15, this gets the MERGE
45
+ # commit of the PR, not just the tip of the PR.
46
+ - name : checkout
47
+ uses : actions/checkout@v2
48
+ - name : Install and run tests
49
+ working-directory : ${{ github.workspace }}
50
+ run : |
51
+ python setup.py build
52
+ cd tests; xvfb-run python test_all.py -v
53
+ # See https://github.community/t/status-check-for-a-matrix-jobs/127354/7
54
+ all-tests :
55
+ name : All tests
56
+ if : ${{ always() }}
57
+ runs-on : ubuntu-20.04
58
+ needs : test
59
+ steps :
60
+ - name : Check test matrix status
61
+ if : ${{ needs.test.result != 'success' }}
62
+ run : exit 1
0 commit comments