Skip to content

Cleanup example notebooks and make them compile again #426

Cleanup example notebooks and make them compile again

Cleanup example notebooks and make them compile again #426

Workflow file for this run

name: Pytest and coveralls
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- '**'
paths:
- 'qupulse/**y'
- 'qctoolkit/**'
- 'tests/**'
- 'setup.*'
- 'pyproject.toml'
- '.github/workflows/*'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
numpy-version: [">=1.24,<2.0", ">=2.0"]
env:
INSTALL_EXTRAS: tests,plotting,zurich-instruments,tektronix,tabor-instruments
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install coverage coveralls
- name: Install numpy ${{ matrix.numpy-version }}
run: python -m pip install "numpy${{ matrix.numpy-version }}"
- name: Install package
run: |
python -m pip install .[${{ env.INSTALL_EXTRAS }}]
- name: Test with pytest
run: |
coverage run -m pytest --junit-xml pytest.xml
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: python-${{ matrix.python-version }}-${{ matrix.time-type }}
COVERALLS_PARALLEL: true
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Unit Test Results ( ${{ matrix.python-version }}-${{ matrix.time-type }} )
path: |
pytest.xml
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Event File
path: ${{ github.event_path }}