Skip to content

Commit

Permalink
matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bqth29 committed Oct 19, 2023
1 parent a78c4ae commit a9a6ada
Showing 1 changed file with 40 additions and 39 deletions.
79 changes: 40 additions & 39 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,43 @@ on:
workflow_dispatch:

jobs:
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]

build:
name: Install and test package on ${{ matrix.os }} for Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install package [pip]
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Run tests with Pytest
run: |
coverage run -m pytest
- name: Coverage
run: |
coverage report
coverage json
- name: Metadata check
run: |
python .github/scripts/metadata_checker
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
cases-matrix:
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]

build:
name: Install and test package on ${{ matrix.os }} for Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install package [pip]
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Run tests with Pytest
run: |
coverage run -m pytest
- name: Coverage
run: |
coverage report
coverage json
- name: Metadata check
run: |
python .github/scripts/metadata_checker
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit a9a6ada

Please sign in to comment.