Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit 493d528

Browse files
committed
Test and build wheel on Windows on GitHub Actions
1 parent f04fc7f commit 493d528

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/test.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9"]
15+
os: [windows-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Get pip cache dir
26+
id: pip-cache
27+
run: |
28+
echo "::set-output name=dir::$(pip cache dir)"
29+
30+
- name: Cache
31+
uses: actions/cache@v2
32+
with:
33+
path: ${{ steps.pip-cache.outputs.dir }}
34+
key:
35+
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
36+
restore-keys: |
37+
${{ matrix.os }}-${{ matrix.python-version }}-
38+
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install -U pip
42+
python -m pip install -U wheel
43+
44+
- name: Test
45+
shell: bash
46+
run: |
47+
python setup.py test
48+
49+
- name: Build wheel
50+
shell: bash
51+
run: |
52+
python setup.py bdist_wheel
53+
54+
- uses: actions/upload-artifact@v2
55+
with:
56+
name: wheels
57+
path: dist\*.whl

0 commit comments

Comments
 (0)