-
Notifications
You must be signed in to change notification settings - Fork 137
48 lines (47 loc) · 1.14 KB
/
pytest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
workflow_call:
workflow_dispatch: {}
jobs:
pytest:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
python_version:
- "3.9"
install_version:
- "[dev]"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Setup
run: |
set -ex
python -m pip install --upgrade pip wheel
python -m pip install -e .${{ matrix.install_version }}
- name: Run Tests
id: tests
run: |
set -ex
python3 -m pytest