|
1 | 1 | name: Python package
|
2 | 2 |
|
3 |
| -on: [workflow_dispatch, pull_request] |
| 3 | +on: [ workflow_dispatch, pull_request ] |
4 | 4 |
|
5 | 5 | jobs:
|
6 | 6 | python-check:
|
7 | 7 | strategy:
|
8 | 8 | matrix:
|
9 |
| - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
10 |
| - platform: [ubuntu-20.04, macos-latest, windows-latest] |
| 9 | + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] |
| 10 | + platform: [ ubuntu-20.04, macos-latest, windows-latest ] |
11 | 11 | runs-on: ${{ matrix.platform }}
|
12 | 12 | steps:
|
13 |
| - - uses: actions/checkout@v3 |
14 |
| - with: |
15 |
| - fetch-depth: 0 |
16 |
| - - name: Set up Python ${{ matrix.python-version }} |
17 |
| - uses: actions/setup-python@v4 |
18 |
| - with: |
19 |
| - python-version: ${{ matrix.python-version }} |
20 |
| - - name: Install dependencies |
21 |
| - run: | |
22 |
| - python -m pip install -U pip poetry |
23 |
| - poetry --version |
24 |
| - poetry install |
25 |
| - - name: Run tests and linters |
26 |
| - run: | |
27 |
| - git config --global user.email "action@github.com" |
28 |
| - git config --global user.name "GitHub Action" |
29 |
| - ./scripts/test |
30 |
| - shell: bash |
31 |
| - - name: Upload coverage to Codecov |
32 |
| - if: runner.os == 'Linux' |
33 |
| - uses: codecov/codecov-action@v3 |
34 |
| - with: |
35 |
| - token: ${{secrets.CODECOV_TOKEN}} |
36 |
| - file: ./coverage.xml |
37 |
| - flags: unittests |
38 |
| - name: codecov-umbrella |
| 13 | + - uses: actions/checkout@v3 |
| 14 | + with: |
| 15 | + fetch-depth: 0 |
| 16 | + - name: Set up Python ${{ matrix.python-version }} |
| 17 | + uses: actions/setup-python@v4 |
| 18 | + with: |
| 19 | + python-version: ${{ matrix.python-version }} |
| 20 | + - name: Install dependencies |
| 21 | + run: | |
| 22 | + # pin poetry to 1.3.2 due to https://github.com/python-poetry/poetry/issues/7611 |
| 23 | + python -m pip install -U pip poetry==1.3.2 |
| 24 | + poetry --version |
| 25 | + poetry install |
| 26 | + - name: Run tests and linters |
| 27 | + run: | |
| 28 | + git config --global user.email "action@github.com" |
| 29 | + git config --global user.name "GitHub Action" |
| 30 | + ./scripts/test |
| 31 | + shell: bash |
| 32 | + - name: Upload coverage to Codecov |
| 33 | + if: runner.os == 'Linux' |
| 34 | + uses: codecov/codecov-action@v3 |
| 35 | + with: |
| 36 | + token: ${{secrets.CODECOV_TOKEN}} |
| 37 | + file: ./coverage.xml |
| 38 | + flags: unittests |
| 39 | + name: codecov-umbrella |
0 commit comments