... | ... |
@@ -4,10 +4,11 @@ on: [push] |
4 | 4 |
|
5 | 5 |
jobs: |
6 | 6 |
test: |
7 |
- runs-on: ubuntu-latest |
|
7 |
+ runs-on: ${{ matrix.os }} |
|
8 | 8 |
strategy: |
9 | 9 |
max-parallel: 4 |
10 | 10 |
matrix: |
11 |
+ os: [ubuntu-latest, macos-latest, windows-latest] |
|
11 | 12 |
python-version: [3.6, 3.7] |
12 | 13 |
steps: |
13 | 14 |
- uses: actions/checkout@v1 |
... | ... |
@@ -28,6 +29,7 @@ jobs: |
28 | 29 |
- name: Test |
29 | 30 |
run: tox |
30 | 31 |
- name: Upload coverage |
32 |
+ if: matrix.os == 'ubuntu-latest' |
|
31 | 33 |
uses: codecov/codecov-action@v1.0.3 |
32 | 34 |
with: |
33 | 35 |
token: ${{secrets.CODECOV_TOKEN}} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
1 |
+name: tests |
|
2 |
+ |
|
3 |
+on: [push] |
|
4 |
+ |
|
5 |
+jobs: |
|
6 |
+ test: |
|
7 |
+ runs-on: ubuntu-latest |
|
8 |
+ strategy: |
|
9 |
+ max-parallel: 4 |
|
10 |
+ matrix: |
|
11 |
+ python-version: [3.6, 3.7] |
|
12 |
+ steps: |
|
13 |
+ - uses: actions/checkout@v1 |
|
14 |
+ - shell: bash |
|
15 |
+ run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" |
|
16 |
+ id: extract_branch |
|
17 |
+ - shell: bash |
|
18 |
+ run: echo "##[set-output name=py_version;]$(py_ver=${{ matrix.python-version }} && echo ${py_ver//./})" |
|
19 |
+ id: extract_py_version |
|
20 |
+ - name: Set up Python ${{ matrix.python-version }} |
|
21 |
+ uses: actions/setup-python@v1 |
|
22 |
+ with: |
|
23 |
+ python-version: ${{ matrix.python-version }} |
|
24 |
+ - name: Install dependencies |
|
25 |
+ run: | |
|
26 |
+ python -m pip install --upgrade pip |
|
27 |
+ pip install tox tox-gh-actions |
|
28 |
+ - name: Test |
|
29 |
+ run: tox |
|
30 |
+ - name: Upload coverage |
|
31 |
+ uses: codecov/codecov-action@v1.0.3 |
|
32 |
+ with: |
|
33 |
+ token: ${{secrets.CODECOV_TOKEN}} |
|
34 |
+ file: ./.coverage.xml |
|
35 |
+ flags: ${{ steps.extract_branch.outputs.branch }},py${{ steps.extract_py_version.outputs.py_version }} |