From 4c20f8c28932cb9269ff645642bc079daee1c94f Mon Sep 17 00:00:00 2001 From: Melvin Strobl Date: Mon, 23 Sep 2024 12:45:34 +0200 Subject: [PATCH] added poetry tests Signed-off-by: Melvin Strobl --- .github/workflows/quality.yml | 9 +++++---- .github/workflows/testing.yml | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 142e396..da0732b 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -19,15 +19,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry - name: Set up Python 3.11 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.11" + cache: 'poetry' # caching pip dependencies - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install flake8 pytest pennylane - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + run: poetry install - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a145e42..2e21816 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -19,15 +19,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry - name: Set up Python 3.11 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.11" + cache: 'poetry' # caching pip dependencies - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install pytest pennylane - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + run: poetry install - name: Test with pytest run: | - pytest + run: poetry run pytest