Skip to content

Commit

Permalink
Merge pull request #76 from jpmorganchase/refactor
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
alex124585 authored Oct 9, 2024
2 parents c66b88c + c6c4f21 commit 97e9cda
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/qokit-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: QOKit test
name: Run tests

on: # workflow_dispatch
push:
Expand All @@ -11,13 +11,13 @@ on: # workflow_dispatch

jobs:
build:

name: Python ${{matrix.python-version}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -29,12 +29,15 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pipreqs black addheader pytest-cov pip-licenses types-pkg-resources==0.1.3
- name: black check
run: |
black --check .
- name: pip install
run: |
pip install .
- name: Run tests
run: |
pytest --cov=qokit --cov-fail-under=75 -rs tests
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/qokit-python-only.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: QOKit test (python simulator only)
name: Run tests (python simulator only, Mac/Linux)

on: # workflow_dispatch
push:
Expand All @@ -12,11 +12,13 @@ on: # workflow_dispatch
jobs:
build:

runs-on: ubuntu-latest
name: Python ${{matrix.python-version}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 97e9cda

Please sign in to comment.