-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (70 loc) · 1.94 KB
/
test.yml
File metadata and controls
81 lines (70 loc) · 1.94 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Test
on:
pull_request:
branches: [4.1.0]
workflow_call:
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
DEBIAN_FRONTEND: noninteractive
POETRY_NO_INTERACTION: 1
POETRY_NO_DEV: 1
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: latest
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
.venv
.cache
key: ${{ runner.os }}-{{ hashFiles('**/poetry.lock') }}-{{ hashFiles('**/.pre-commit-config.yaml') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- uses: pre-commit/action@v3.0.1
privoxy:
runs-on: ubuntu-latest
needs: pre-commit
env:
DEBIAN_FRONTEND: noninteractive
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
PYTHON_VERSION: "3.13"
steps:
- uses: actions/cache@v4
with:
path: |
.venv
.cache
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Switch to current branch
run: git checkout ${{ env.BRANCH }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: latest
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run pytest
run: poetry run pytest --privoxy-version ${{ github.ref_name }} --no-cache -v