-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (92 loc) · 2.34 KB
/
Copy pathtest.yml
File metadata and controls
103 lines (92 loc) · 2.34 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Test
on:
pull_request:
branches: [master]
push:
branches: [master]
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@v4
- uses: actions/setup-python@v4
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
isodoo:
strategy:
matrix:
odoo_version:
- "6.0"
- "6.1"
- "7.0"
- "8.0"
- "9.0"
- "10.0"
- "11.0"
- "12.0"
- "13.0"
- "14.0"
- "15.0"
- "16.0"
- "17.0"
- "18.0"
- "19.0"
python-version: [3.13]
fail-fast: false
runs-on: ubuntu-latest
needs: pre-commit
env:
DEBIAN_FRONTEND: noninteractive
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
steps:
- uses: actions/cache@v4
with:
path: |
.venv
.cache
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Switch to current branch
run: git checkout ${{ env.BRANCH }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- 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 --odoo-version ${{ matrix.odoo_version }} --no-cache -v