• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Run tests on a pr
2
3on:
4  # run on pull request to main excluding changes that are only on doc or example folders
5  pull_request:
6    branches:
7      - main
8    paths-ignore:
9      - "doc/**"
10
11jobs:
12  run-test:
13    name: ${{ matrix.python-version }}-${{ matrix.os }}-${{matrix.tox-env}}
14    runs-on: ${{ matrix.os }}
15    strategy:
16      # run this job using this matrix
17      matrix:
18        os:
19          - "ubuntu-latest"
20        python-version:
21          - "3.10"
22        tox-env:
23          - ""
24          - "-e pep8"
25
26      fail-fast: false
27
28    # steps to run in each job. Some are github actions, others run shell commands
29    steps:
30      - name: Checkout repo
31        uses: actions/checkout@v4
32
33      - name: Set up python
34        uses: actions/setup-python@v4
35        with:
36          python-version: ${{ matrix.python-version }}
37          architecture: ${{ matrix.architecture }}
38
39      - name: Install dependencies
40        run: |
41          python -m pip install --upgrade pip
42          pip install --upgrade tox setuptools
43          pip list
44
45      - name: Run tests
46        run: tox ${{ matrix.tox-env }}
47