Skip to content

Commit 6623377

Browse files
committedOct 2, 2024·
Update GitHub workflows and add support for python 3.12
1 parent 84aaf5a commit 6623377

File tree

2 files changed

+30
-21
lines changed

2 files changed

+30
-21
lines changed
 

‎.github/workflows/python-package.yml

+18-15
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
1-
name: lint+test package
1+
name: Lint & Test package
22

33
on:
44
push:
55
branches: ["master"]
66
pull_request:
77
branches: ["master"]
8+
workflow_dispatch:
89

910
jobs:
10-
build:
1111

12-
runs-on: ubuntu-latest
12+
lint-test:
13+
14+
runs-on: ${{ matrix.os }}
1315
strategy:
1416
fail-fast: false
1517
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+
1821
steps:
1922
- 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+
2525
- name: Set up Python ${{ matrix.python-version }}
2626
uses: actions/setup-python@v3
2727
with:
2828
python-version: ${{ matrix.python-version }}
29+
2930
- name: Install dependencies
3031
run: |
3132
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+
3435
- name: Lint with pylint
3536
run: |
36-
pylint src/ tests/
37+
python -m pylint src/ tests/
38+
3739
- name: Test with pytest
3840
run: |
39-
pytest -v --cov=qiskit_symb
41+
python -m pytest -v --cov=qiskit_symb
42+
4043
- name: Coveralls
4144
env:
4245
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
4346
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
run: coveralls --service=github
47+
run: python -m coveralls --service=github

‎.github/workflows/python-publish.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
name: publish package
1+
name: Publish package PyPI
22

33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
67

78
jobs:
9+
810
deploy:
911

1012
runs-on: ubuntu-latest
11-
1213
steps:
13-
- uses: actions/checkout@v3
14-
- name: Set up Python
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Python
1518
uses: actions/setup-python@v3
1619
with:
17-
python-version: "3.8"
20+
python-version: "3.12"
21+
1822
- name: Install dependencies
1923
run: |
2024
python -m pip install --upgrade pip
21-
pip install build
25+
python -m pip install build
26+
2227
- name: Build package
2328
run: python -m build
29+
2430
- name: Publish package
2531
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
2632
with:

0 commit comments

Comments
 (0)
Please sign in to comment.