|
1 |
| -name: lint+test package |
| 1 | +name: Lint & Test package |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | branches: ["master"]
|
6 | 6 | pull_request:
|
7 | 7 | branches: ["master"]
|
| 8 | + workflow_dispatch: |
8 | 9 |
|
9 | 10 | jobs:
|
10 |
| - build: |
11 | 11 |
|
12 |
| - runs-on: ubuntu-latest |
| 12 | + lint-test: |
| 13 | + |
| 14 | + runs-on: ${{ matrix.os }} |
13 | 15 | strategy:
|
14 | 16 | fail-fast: false
|
15 | 17 | matrix:
|
16 |
| - python-version: ["3.8", "3.9", "3.10", "3.11"] |
17 |
| - |
| 18 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 19 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 20 | + |
18 | 21 | steps:
|
19 | 22 | - name: Checkout repository
|
20 |
| - uses: actions/checkout@v3 |
21 |
| - - name: Set up Node.js 20 |
22 |
| - uses: actions/setup-node@v3 |
23 |
| - with: |
24 |
| - node-version: 20 |
| 23 | + uses: actions/checkout@v4 |
| 24 | + |
25 | 25 | - name: Set up Python ${{ matrix.python-version }}
|
26 | 26 | uses: actions/setup-python@v3
|
27 | 27 | with:
|
28 | 28 | python-version: ${{ matrix.python-version }}
|
| 29 | + |
29 | 30 | - name: Install dependencies
|
30 | 31 | run: |
|
31 | 32 | python -m pip install --upgrade pip
|
32 |
| - python -m pip install -r requirements.txt |
33 |
| - python -m pip install . |
| 33 | + python -m pip install --upgrade . |
| 34 | +
|
34 | 35 | - name: Lint with pylint
|
35 | 36 | run: |
|
36 |
| - pylint src/ tests/ |
| 37 | + python -m pylint src/ tests/ |
| 38 | +
|
37 | 39 | - name: Test with pytest
|
38 | 40 | run: |
|
39 |
| - pytest -v --cov=qiskit_symb |
| 41 | + python -m pytest -v --cov=qiskit_symb |
| 42 | +
|
40 | 43 | - name: Coveralls
|
41 | 44 | env:
|
42 | 45 | COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
43 | 46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
44 |
| - run: coveralls --service=github |
| 47 | + run: python -m coveralls --service=github |
0 commit comments