-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (60 loc) · 1.78 KB
/
Copy pathci.yml
File metadata and controls
64 lines (60 loc) · 1.78 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
name: CI
on:
push:
branches: ["19.0", "18.0", "main"]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Ruff lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install ruff
- name: ruff check
run: ruff check .
test:
name: Odoo 19 tests
runs-on: ubuntu-latest
container:
image: odoo:19
# The odoo image runs as the non-root 'odoo' user, which can't write to
# the runner's work dir (/__w) — actions/checkout then fails with EACCES.
# Run as root so checkout and the test run can write freely.
options: --user root
services:
db:
image: postgres:16
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
# The module directory must be named with underscores for Odoo to load it.
- uses: actions/checkout@v4
with:
path: account_invoice_digitize_ai
- name: Stage module into the addons path
run: cp -r account_invoice_digitize_ai /mnt/extra-addons/
- name: Run module tests
run: |
odoo \
--db_host=db --db_user=odoo --db_password=odoo \
-d test_account_invoice_digitize_ai \
-i account_invoice_digitize_ai \
--test-enable \
--test-tags=/account_invoice_digitize_ai \
--stop-after-init \
--log-level=test \
--max-cron-threads=0