Skip to content

Commit

Permalink
Merge pull request #11 from qiboteam/workflows
Browse files Browse the repository at this point in the history
Tests
  • Loading branch information
scarrazza committed Mar 3, 2024
2 parents da105d1 + a34ef02 commit e173e5e
Show file tree
Hide file tree
Showing 6 changed files with 1,485 additions and 216 deletions.
61 changes: 54 additions & 7 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,63 @@ on:
pull_request:
types: [labeled]

env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
QIBO_CLIENT_TII_TOKEN: ${{ secrets.QIBO_CLIENT_TII_TOKEN }}

jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'run-workflow') || github.event_name == 'push'
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, '3.10', '3.11']
uses: qiboteam/workflows/.github/workflows/rules-poetry.yml@main
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
poetry-extras: "--with dev"
secrets: inherit
python-version: [3.9, "3.10", "3.11"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Disable modern installer
run: poetry config installer.modern-installation false
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
if: steps.cache.outputs.cache-hit != 'true'
- name: Install project
run: poetry install --no-interaction --with test
- name: Install task runner
run: pip install poethepoet
- name: Lint
run: |
source $VENV
poe lint
poe lint-warnings
- name: Test
run: |
source $VENV
export QRCCLUSTER_PORT=8080
poe test
- name: Upload coverage to Codecov
if: startsWith(runner.os, 'Linux')
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
name: unit-tests
fail_ci_if_error: true
token: ${{ secrets.codecov_token }}
12 changes: 12 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,15 @@ API Reference
:caption: Contents:

backends

.. toctree::
:maxdepth: 1
:caption: Documentation links

Qibo docs <https://qibo.science/qibo/stable/>
Qibolab docs <https://qibo.science/qibolab/stable/>
Qibocal docs <https://qibo.science/qibocal/stable/>
Qibosoq docs <https://qibo.science/qibosoq/stable/>
Qibochem docs <https://qibo.science/qibochem/stable/>
Qibotn docs <https://qibo.science/qibotn/stable/>
Qibo-cloud-backends docs <https://qibo.science/qibo-cloud-backends/stable/>
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
poetry = {
enable = true;
install.enable = true;
install.groups = ["dev"];
install.groups = ["dev" "test"];
install.allExtras = true;
};
version = "3.11";
Expand Down
Loading

0 comments on commit e173e5e

Please sign in to comment.