1- name : Build-Test-Lint-etc (linux)
1+ name : Build-Test-Lint-Typecheck
22
33on : [push]
44
55jobs :
6- setup :
6+ lint :
7+ name : Lint
78 runs-on : ubuntu-latest
89 strategy :
9- fail-fast : false
1010 matrix :
1111 python-version : [ "3.10" ]
12- name : Setup
1312 steps :
1413 - uses : actions/checkout@v3
15- - name : Set up Python ${{ matrix. python-version }}
14+ - name : setup python
1615 uses : actions/setup-python@v4
1716 with :
1817 python-version : ${{ matrix.python-version }}
19- cache : ' pip'
20- - run : |
18+ cache : pip
19+ - name : create and activate venv
20+ run : |
2121 ./ci/linux/create_venv.sh
2222 ./ci/linux/install_dependencies.sh
23- - name : ' Tar venv'
24- run : tar -cvf venv.tar ./.venv/
25- - name : Save venv
26- uses : actions/upload-artifact@v4
27- with :
28- path : ./venv.tar
29- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
30-
31- lint :
32- name : Lint
33- runs-on : ubuntu-latest
34- needs : [ setup ]
35- strategy :
36- fail-fast : false
37- matrix :
38- python-version : [ "3.10" ]
39- steps :
40- - uses : actions/checkout@v3
41- - name : Restore venv
42- uses : actions/download-artifact@v4
43- with :
44- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
45- - name : Untar venv
46- run : tar -xvf venv.tar
47- - name : run unit tests
48- run : |
49- ./ci/linux/lint.sh
23+ - name : run lint
24+ run : |
25+ ./ci/linux/lint.sh
5026
5127 test :
52- name : Test
28+ name : Unit Tests
5329 runs-on : ubuntu-latest
54- needs : [ setup ]
5530 strategy :
56- fail-fast : false
5731 matrix :
5832 python-version : [ "3.10" ]
5933 steps :
60- - uses : actions/checkout@v3
61- - name : Restore venv
62- uses : actions/download-artifact@v4
63- with :
64- name : ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}}
65- - name : Untar venv
66- run : tar -xvf venv.tar
67- - name : run unit tests
68- run : |
69- ./ci/linux/test_unit.sh
70-
71- - name : Surface failing tests
72- if : always()
73- uses : pmeier/pytest-results-action@main
74- with :
75- # A list of JUnit XML files, directories containing the former, and wildcard
76- # patterns to process.
77- # See @actions/glob for supported patterns.
78- path : test-results.xml
79-
80- # Add a summary of the results at the top of the report
81- # Default: true
82- summary : true
83-
84- # Select which results should be included in the report.
85- # Follows the same syntax as
86- # `pytest -r`
87- # Default: fEX
88- display-options : fEX
89-
90- # Fail the workflow if no JUnit XML was found.
91- # Default: true
92- fail-on-empty : true
34+ - uses : actions/checkout@v3
35+ - name : setup python
36+ uses : actions/setup-python@v4
37+ with :
38+ python-version : ${{ matrix.python-version }}
39+ cache : pip
40+ - name : create and activate venv
41+ run : |
42+ ./ci/linux/create_venv.sh
43+ ./ci/linux/install_dependencies.sh
44+ - name : run unit tests
45+ run : |
46+ ./ci/linux/test_unit.sh
47+ - name : surface failing tests
48+ if : always()
49+ uses : pmeier/pytest-results-action@main
50+ with :
51+ path : test-results.xml
52+ summary : true
53+ display-options : fEX
54+ fail-on-empty : true
9355
9456 typecheck :
9557 name : Typecheck
9658 runs-on : ubuntu-latest
97- needs : [ setup ]
9859 strategy :
99- fail-fast : false
10060 matrix :
10161 python-version : [ "3.10" ]
10262 steps :
103- - uses : actions/checkout@v3
104- - name : Restore venv
105- uses : actions/download-artifact @v4
106- with :
107- name : ${{ runner.os }}- python-${{ matrix.python-version }}-venv-${{github.run_id }}
108- - name : Untar venv
109- run : tar -xvf venv.tar
110- - name : Add mypy annotator
111- uses : pr-annotators/mypy-pr-annotator@v1.0.0
112-
113- - name : run typechecker
114- run : |
115- ./ci/linux/typecheck.sh
63+ - uses : actions/checkout@v3
64+ - name : setup python
65+ uses : actions/setup-python @v4
66+ with :
67+ python-version : ${{ matrix.python-version }}
68+ cache : pip
69+ - name : create and activate venv
70+ run : |
71+ ./ci/linux/create_venv.sh
72+ ./ci/linux/install_dependencies.sh
73+ - name : run typechecker
74+ run : |
75+ ./ci/linux/typecheck.sh
0 commit comments