@@ -7,34 +7,53 @@ on: [push, pull_request]
7
7
8
8
jobs :
9
9
build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ with :
14
+ fetch-depth : 0
15
+ - uses : actions/setup-dotnet@v1
16
+ - uses : actions/setup-python@v4
17
+ - name : Install dependencies
18
+ run : |
19
+ python -m pip install --upgrade pip
20
+ pip install build
21
+ - name : Build
22
+ run : python -m build
23
+ - name : Upload source distribution
24
+ uses : actions/upload-artifact@v3
25
+ with :
26
+ name : sdist
27
+ path : " dist/*.tar.gz"
28
+ if-no-files-found : error
29
+ - name : Upload wheel
30
+ uses : actions/upload-artifact@v3
31
+ with :
32
+ name : wheel
33
+ path : " dist/*.whl"
34
+ if-no-files-found : error
35
+
36
+ test :
10
37
runs-on : ${{ matrix.os }}
38
+ needs : build
11
39
strategy :
12
40
matrix :
13
41
os : [ubuntu-latest, windows-latest, macos-latest]
14
42
python : ['3.10', '3.9', '3.8', '3.7'] # pypy3
15
43
16
44
steps :
17
- - uses : actions/checkout@v2
45
+ - uses : actions/checkout@v3
18
46
19
47
- name : Setup .NET
20
48
uses : actions/setup-dotnet@v1
21
49
with :
22
50
dotnet-version : ' 6.0.x'
23
51
24
52
- name : Set up Python ${{ matrix.python }}
25
- uses : actions/setup-python@v2
53
+ uses : actions/setup-python@v4
26
54
with :
27
55
python-version : ${{ matrix.python }}
28
56
29
- - name : Install dependencies
30
- run : |
31
- python -m pip install --upgrade pip
32
- pip install pytest cffi
33
-
34
- - name : Build
35
- run : |
36
- pip install -e .
37
-
38
57
- name : Cache Mono
39
58
if : runner.os == 'Windows'
40
59
uses : actions/cache@v2
47
66
run : |
48
67
choco install -y mono ${{ matrix.python == 'pypy3' && '--x86' || '' }}
49
68
69
+ - name : Install dependencies
70
+ run : |
71
+ python -m pip install --upgrade pip
72
+ pip install pytest
73
+
74
+ - name : Download wheel
75
+ uses : actions/download-artifact@v3
76
+ with :
77
+ name : wheel
78
+ path : dist/
79
+
80
+ - name : Install wheel
81
+ shell : bash
82
+ run : |
83
+ pip install dist/*.whl
84
+
50
85
- name : Test with pytest
51
86
run : |
52
87
pytest
0 commit comments