| 1 |
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions |
| 2 |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 3 |
|
| 4 |
name: Python package |
| 5 |
|
| 6 |
on: |
| 7 |
push: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
- support/2.1.x |
| 11 |
pull_request: |
| 12 |
branches: |
| 13 |
- master |
| 14 |
- support/2.1.x |
| 15 |
|
| 16 |
jobs: |
| 17 |
build: |
| 18 |
|
| 19 |
runs-on: ubuntu-latest |
| 20 |
strategy: |
| 21 |
fail-fast: false |
| 22 |
matrix: |
| 23 |
python-version: ["3.11", "3.12"] |
| 24 |
|
| 25 |
steps: |
| 26 |
- uses: actions/checkout@v2 |
| 27 |
- name: Set up Python ${{ matrix.python-version }} |
| 28 |
uses: actions/setup-python@v2 |
| 29 |
with: |
| 30 |
python-version: ${{ matrix.python-version }} |
| 31 |
- name: Install dependencies |
| 32 |
run: | |
| 33 |
python -m pip install --upgrade pip |
| 34 |
python -m pip install flake8 pytest |
| 35 |
python -m pip install -e .[tests] |
| 36 |
- name: Test with pytest |
| 37 |
run: | |
| 38 |
pytest --cov |