From d35d0549b715a1bb0a40ec0b649473903e861ecc Mon Sep 17 00:00:00 2001 From: Alex B <89206887+alex124585@users.noreply.github.com> Date: Fri, 4 Oct 2024 13:59:19 -0400 Subject: [PATCH 1/5] Update qokit-package.yml Added macOS --- .github/workflows/qokit-package.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/qokit-package.yml b/.github/workflows/qokit-package.yml index 4222103e..dbc9df60 100644 --- a/.github/workflows/qokit-package.yml +++ b/.github/workflows/qokit-package.yml @@ -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 @@ -29,12 +29,20 @@ jobs: run: | python -m pip install --upgrade pip pip install pipreqs black addheader pytest-cov pip-licenses types-pkg-resources==0.1.3 + - name: Install GCC (macOS only) + if: runner.os == 'macOS' + run: | + brew install gcc + export PATH=$PATH:/opt/homebrew/ + - 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 From 57ab2aab9226fffd083e24c2e1abf7226c90774f Mon Sep 17 00:00:00 2001 From: Alex B <89206887+alex124585@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:09:49 -0400 Subject: [PATCH 2/5] Update qokit-python-only.yml add MacOs --- .github/workflows/qokit-python-only.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/qokit-python-only.yml b/.github/workflows/qokit-python-only.yml index 86357754..095f2a08 100644 --- a/.github/workflows/qokit-python-only.yml +++ b/.github/workflows/qokit-python-only.yml @@ -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: QOKit test (python simulator only, Mac/Linux) on: # workflow_dispatch push: @@ -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 From 7e0a9c3b0789bfb29b4edd6aa293914eeb1cc7e1 Mon Sep 17 00:00:00 2001 From: Ruslan Shaydulin Date: Tue, 8 Oct 2024 19:00:05 -0400 Subject: [PATCH 3/5] Rename test --- .github/workflows/qokit-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qokit-package.yml b/.github/workflows/qokit-package.yml index dbc9df60..18874d11 100644 --- a/.github/workflows/qokit-package.yml +++ b/.github/workflows/qokit-package.yml @@ -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: From 555dff22eb195f7a7affa966909b5b5ed0a95d5c Mon Sep 17 00:00:00 2001 From: Ruslan Shaydulin Date: Tue, 8 Oct 2024 19:01:01 -0400 Subject: [PATCH 4/5] Rename python-only tests --- .github/workflows/qokit-python-only.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qokit-python-only.yml b/.github/workflows/qokit-python-only.yml index 095f2a08..19d8559d 100644 --- a/.github/workflows/qokit-python-only.yml +++ b/.github/workflows/qokit-python-only.yml @@ -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, Mac/Linux) +name: Run tests (python simulator only, Mac/Linux) on: # workflow_dispatch push: From c6c4f217017ccef150fe72c60ef2501b66b4ae4b Mon Sep 17 00:00:00 2001 From: Ruslan Shaydulin Date: Wed, 9 Oct 2024 12:31:21 -0400 Subject: [PATCH 5/5] brew install gcc shows "gcc already installed". checking if pipeline succeeds without gcc install --- .github/workflows/qokit-package.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/qokit-package.yml b/.github/workflows/qokit-package.yml index 18874d11..d3cbad43 100644 --- a/.github/workflows/qokit-package.yml +++ b/.github/workflows/qokit-package.yml @@ -29,12 +29,7 @@ jobs: run: | python -m pip install --upgrade pip pip install pipreqs black addheader pytest-cov pip-licenses types-pkg-resources==0.1.3 - - name: Install GCC (macOS only) - if: runner.os == 'macOS' - run: | - brew install gcc - export PATH=$PATH:/opt/homebrew/ - + - name: black check run: | black --check .