7
7
mypy :
8
8
runs-on : ubuntu-latest
9
9
steps :
10
- - uses : actions/checkout@v2
11
- - uses : actions/setup-python@v2
10
+ - uses : actions/checkout@v3
11
+ - uses : actions/setup-python@v4
12
+ with :
13
+ python-version : ' 3.x'
14
+
15
+ - name : get date for caching
16
+ id : get-week-number
17
+ run : echo "cachedate=$(/bin/date -u "+%U")" >>$GITHUB_OUTPUT
18
+ shell : bash
19
+
20
+ - name : cache pip packages
21
+ uses : actions/cache@v3
22
+ with :
23
+ path : ~/.cache/pip
24
+ key : pip-os-${{ runner.os }}-weeknum-${{ steps.get-week-number.outputs.cachedate }}-job-${{ github.job }}
25
+
12
26
- run : python -m pip install tox
27
+
13
28
- run : python -m tox run -e mypy
14
29
15
30
test :
@@ -20,12 +35,30 @@ jobs:
20
35
name : " Run Tests on ${{ matrix.os }}, py${{ matrix.py }}"
21
36
runs-on : ${{ matrix.os }}
22
37
steps :
23
- - uses : actions/checkout@v2
24
- - uses : actions/setup-python@v2
38
+ - uses : actions/checkout@v3
39
+ - uses : actions/setup-python@v4
25
40
with :
26
41
python-version : ${{ matrix.py }}
27
- - name : install requirements
28
- run : python -m pip install tox
42
+
43
+ - name : get date for caching
44
+ id : get-week-number
45
+ run : echo "cachedate=$(/bin/date -u "+%U")" >>$GITHUB_OUTPUT
46
+ shell : bash
47
+
48
+ - name : cache pip packages
49
+ uses : actions/cache@v3
50
+ with :
51
+ path : ~/.cache/pip
52
+ key : pip-os-${{ runner.os }}-weeknum-${{ steps.get-week-number.outputs.cachedate }}-job-${{ github.job }}
53
+
54
+ - run : python -m pip install tox
55
+
56
+ - name : cache tox virtualenvs
57
+ uses : actions/cache@v3
58
+ with :
59
+ path : .tox
60
+ key : tox-os-${{ runner.os }}-py${{ matrix.py }}-weeknum-${{ steps.get-week-number.outputs.cachedate }}-job-${{ github.job }}-hash-${{ hashFiles('tox.ini', 'setup.cfg') }}
61
+
29
62
- name : test
30
63
run : python -m tox run -m ci
31
64
- name : twine-check
@@ -35,15 +68,30 @@ jobs:
35
68
name : " Self-Check"
36
69
runs-on : ubuntu-latest
37
70
steps :
38
- - uses : actions/checkout@v2
39
- - uses : actions/setup-python@v2
71
+ - uses : actions/checkout@v3
72
+
73
+ - uses : actions/setup-python@v4
74
+ with :
75
+ python-version : ' 3.x'
76
+
77
+ - name : get date for caching
78
+ id : get-week-number
79
+ run : echo "cachedate=$(/bin/date -u "+%U")" >>$GITHUB_OUTPUT
80
+ shell : bash
81
+
82
+ - name : cache pip packages
83
+ uses : actions/cache@v3
40
84
with :
41
- python-version : ' 3.11'
85
+ path : ~/.cache/pip
86
+ key : pip-os-${{ runner.os }}-weeknum-${{ steps.get-week-number.outputs.cachedate }}-job-${{ github.job }}
87
+
42
88
- name : install from source
43
89
run : |
44
90
python -m pip install -U pip setuptools
45
91
python -m pip install .
92
+
46
93
- name : run on own workflows via HTTPS schema
47
94
run : check-jsonschema --schemafile "https://json.schemastore.org/github-workflow" .github/workflows/*.yaml
95
+
48
96
- name : run on own workflows via vendored schema
49
97
run : check-jsonschema --builtin-schema vendor.github-workflows .github/workflows/*.yaml
0 commit comments