• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Run tests
2
3on:
4  # run on push in main or rel_* branches excluding changes are only on doc or example folders
5  push:
6    branches:
7      - main
8      - "rel_*"
9      # branches used to test the workflow
10      - "workflow_test_*"
11    paths-ignore:
12      - "docs/**"
13
14jobs:
15  run-test:
16    name: ${{ matrix.python-version }}-${{ matrix.os }}
17    runs-on: ${{ matrix.os }}
18    strategy:
19      # run this job using this matrix
20      matrix:
21        os:
22          - "ubuntu-latest"
23          - "windows-latest"
24          - "macos-latest"
25        python-version:
26          - "3.8"
27          - "3.9"
28          - "3.10"
29          - "3.11"
30          - "3.12"
31
32        exclude:
33          # beaker raises warning on 3.10. only windows seems affected
34          # See https://github.com/bbangert/beaker/pull/213
35          - os: "windows-latest"
36            python-version: "3.10"
37
38      fail-fast: false
39
40    # steps to run in each job. Some are github actions, others run shell commands
41    steps:
42      - name: Checkout repo
43        uses: actions/checkout@v4
44
45      - name: Set up python
46        uses: actions/setup-python@v4
47        with:
48          python-version: ${{ matrix.python-version }}
49          allow-prereleases: true
50          architecture: ${{ matrix.architecture }}
51
52      - name: Install dependencies
53        run: |
54          python -m pip install --upgrade pip
55          pip install --upgrade tox setuptools
56          pip list
57
58      - name: Run tests
59        run: tox
60