Merge pull request #78 from European-XFEL/dependabot/pip/dot-github/d… #100
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: Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
env: | |
SYSTEM_PACKAGES: gcc g++ xvfb qtbase5-dev | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache APT Packages | |
uses: awalsh128/[email protected] | |
with: | |
packages: ${{ env.SYSTEM_PACKAGES }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('.github/dependabot/constraints.txt') }} | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install .[test] --constraint .github/dependabot/constraints.txt | |
- name: Test with pytest | |
run: | | |
python3 -m pytest -v |