-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.3 KB
/
python-tests.yml
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
49
50
51
name: Python Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
POETRY_HTTP_CONCURRENCY: 1 # Forces single-threaded downloads
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11.9'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry==1.8.5
- name: Configure Poetry
run: poetry config virtualenvs.in-project true
- name: Cache Poetry download cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-cache-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-cache-
- name: Cache virtual environment
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Install dependencies
run: poetry install --all-extras
- name: Run tests
run: poetry run pytest --maxfail=100 --disable-warnings -v --ignore self_serve_platform/tests/integration