Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGardhouse committed Jan 20, 2025
1 parent c6431ba commit fca613c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,22 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
honeywell:
- pennylane_honeywell/**
- tests/**
- .pylintrc
- Makefile
- requirements-ci.txt
- requirements.txt
- setup.py
- uses: actions/checkout@v1
- name: Black Code Formatter
if: steps.filter.outputs.honeywell == 'true'
uses: lgeiger/black-action@master
with:
args: "-l 100 pennylane_honeywell/ --check"
20 changes: 19 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,46 @@ jobs:
strategy:
matrix:
python-version: [3.9, '3.10', '3.11']
steps:
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
honeywell:
- pennylane_honeywell/**
- tests/**
- .pylintrc
- Makefile
- requirements-ci.txt
- requirements.txt
- setup.py
- uses: actions/checkout@v1
- name: Set up Python
if: steps.filter.outputs.honeywell == 'true'
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: steps.filter.outputs.honeywell == 'true'
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
pip install wheel pytest pytest-cov pytest-mock --upgrade
- name: Install Plugin
if: steps.filter.outputs.honeywell == 'true'
run: |
python setup.py bdist_wheel
pip install dist/PennyLane*.whl
- name: Run tests
if: steps.filter.outputs.honeywell == 'true'
run: python -m pytest tests --cov=pennylane_honeywell --cov-report=term-missing --cov-report=xml -p no:warnings --tb=native
- name: Upload coverage to Codecov
if: steps.filter.outputs.honeywell == 'true'
uses: codecov/[email protected]
with:
file: ./coverage.xml

0 comments on commit fca613c

Please sign in to comment.