Skip to content

Commit

Permalink
Update pre-commits. (#18)
Browse files Browse the repository at this point in the history
* Update pre-commits.

* Gather examples and notebooks tests on schedule.

* Remove obsolete files.

* Test against Python 3.9 and 3.10.
  • Loading branch information
RolandMacDoland authored Oct 2, 2023
1 parent ae6db09 commit d799bb0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 43 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/test_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ jobs:
test_qadence_ubuntu:
name: Test Qadence (ubuntu)
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Select Python 3.10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: |
pip install hatch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Qadence example tests.
name: Run Qadence example and notebook tests.

on:
push:
Expand All @@ -9,8 +9,10 @@ on:
- main
paths:
- examples
paths-ignore:
- examples/notebooks
- notebooks
schedule:
# 03:00 every Saturday morning
- cron: '0 3 * * 6'
workflow_dispatch: {}

concurrency:
Expand All @@ -33,3 +35,6 @@ jobs:
- name: Run example tests
run: |
hatch -v run test-examples
- name: Run notebooks tests
run: |
hatch -v run test-notebooks
7 changes: 5 additions & 2 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ jobs:
test_qadence_ubuntu:
name: Test Qadence (ubuntu)
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Select Python 3.10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ matrix.python-version }}
- name: Install Hatch
run: |
pip install hatch
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/test_notebooks.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ repos:
args: ['--maxkb=600']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.288"
rev: "v0.0.291"
hooks:
- id: ruff
args: [--fix, --show-fixes, --show-source]
args: [--fix, --show-fixes, --show-source, --exclude, examples/draw.py]

- repo: https://github.com/ambv/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black

Expand Down

0 comments on commit d799bb0

Please sign in to comment.