Remove qctoolkit alias #416
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pytest and coveralls | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- '**' | |
paths: | |
- 'qupulse/**y' | |
- 'tests/**' | |
- 'setup.*' | |
- 'pyproject.toml' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
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 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 }} |