-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.48 KB
/
test.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
52
53
name: tests
on:
pull_request:
branches:
- "add_workflow"
push:
branches:
- "add_workflow"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
env:
REPO_NAME: ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}
name: Check $REPO_NAME
services:
postgres:
image: postgres:16.2
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
ports:
- 5432:5432
steps:
- uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
- run: |
set -x
docker version
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/checkout@v4
with:
repository: INRIM/Odoo-Qa
path: oqa
ref: 17.0
token: ${{ secrets.CA_TOKEN }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade manifestoo
python -m pip install --upgrade coverage
- name: Init Data
run: ${PWD}/oqa/bin/init_repo.sh $REPO_NAME
- name: Tests
run: docker run -v ${PWD}/oqa/bin/run_tests.sh:/mnt/tests/runtests.sh -v ${PWD}/:/mnt/$REPO_NAME -v ${PWD}/oqa/bin/odoo.conf:/etc/odoo/odoo.conf --network=host -e PGHOST=localhost -e ADDONS=${ADDONS} -e PGDATABASE=${PGDATABASE} -e TESTTAGS=inrim odoo:17.0 /mnt/tests/runtests.sh