Use enum.Flag for ActionIfExists #267
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: Python pytest | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths: | |
- 'wikibaseintegrator/**.py' | |
- 'test/**.py' | |
- 'setup.cfg' | |
- 'setup.py' | |
- 'requirements.txt' | |
- 'pyproject.toml' | |
pull_request: | |
branches: [ '**' ] | |
paths: | |
- 'wikibaseintegrator/**.py' | |
- 'test/**.py' | |
- 'setup.cfg' | |
- 'setup.py' | |
- 'requirements.txt' | |
- 'pyproject.toml' | |
jobs: | |
build: | |
name: pytest ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Upgrade setup tools | |
run: | | |
python -m pip install --upgrade pip setuptools | |
- name: Install dependencies | |
run: | | |
python -m pip install .[dev] | |
- name: Test with pytest | |
run: | | |
python -m pytest |