@@ -7,34 +7,53 @@ on: [push, pull_request]
77
88jobs :
99 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 :
1037 runs-on : ${{ matrix.os }}
38+ needs : build
1139 strategy :
1240 matrix :
1341 os : [ubuntu-latest, windows-latest, macos-latest]
1442 python : ['3.10', '3.9', '3.8', '3.7'] # pypy3
1543
1644 steps :
17- - uses : actions/checkout@v2
45+ - uses : actions/checkout@v3
1846
1947 - name : Setup .NET
2048 uses : actions/setup-dotnet@v1
2149 with :
2250 dotnet-version : ' 6.0.x'
2351
2452 - name : Set up Python ${{ matrix.python }}
25- uses : actions/setup-python@v2
53+ uses : actions/setup-python@v4
2654 with :
2755 python-version : ${{ matrix.python }}
2856
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-
3857 - name : Cache Mono
3958 if : runner.os == 'Windows'
4059 uses : actions/cache@v2
4766 run : |
4867 choco install -y mono ${{ matrix.python == 'pypy3' && '--x86' || '' }}
4968
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+
5085 - name : Test with pytest
5186 run : |
5287 pytest
0 commit comments