Skip to content

Commit 6cd7415

Browse files
committed
[UPD] Switch to Github Actions
1 parent 0a61cc4 commit 6cd7415

File tree

4 files changed

+105
-75
lines changed

4 files changed

+105
-75
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
22
_commit: v1.7.0
33
_src_path: gh:oca/oca-addons-repo-template
4-
ci: Travis
4+
ci: GitHub
55
dependency_installation_mode: PIP
66
generate_requirements_txt: true
77
include_wkhtmltopdf: false

.github/workflows/test.yml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "14.0*"
7+
push:
8+
branches:
9+
- "14.0"
10+
- "14.0-ocabot-*"
11+
12+
jobs:
13+
unreleased-deps:
14+
runs-on: ubuntu-latest
15+
name: Detect unreleased dependencies
16+
steps:
17+
- uses: actions/checkout@v2
18+
- run: |
19+
for reqfile in requirements.txt test-requirements.txt ; do
20+
if [ -f ${reqfile} ] ; then
21+
result=0
22+
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
23+
grep "^[^#].*/" ${reqfile} || result=$?
24+
if [ $result -eq 0 ] ; then
25+
echo "Unreleased dependencies found in ${reqfile}."
26+
exit 1
27+
fi
28+
fi
29+
done
30+
test:
31+
runs-on: ubuntu-latest
32+
container: ${{ matrix.container }}
33+
name: ${{ matrix.name }}
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
39+
include: "purchase_cancel_reason"
40+
makepot: "true"
41+
name: test with Odoo
42+
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
43+
include: "purchase_cancel_reason"
44+
name: test with OCB
45+
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
46+
include: "purchase_cancel_confirm"
47+
makepot: "true"
48+
name: test with Odoo
49+
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
50+
include: "purchase_cancel_confirm"
51+
name: test with OCB
52+
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
53+
include: "purchase_order_type"
54+
makepot: "true"
55+
name: test with Odoo
56+
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
57+
include: "purchase_order_type"
58+
name: test with OCB
59+
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
60+
include: "purchase_quick"
61+
makepot: "true"
62+
name: test with Odoo
63+
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
64+
include: "purchase_quick"
65+
name: test with OCB
66+
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
67+
exclude: "purchase_cancel_reason,purchase_cancel_confirm,purchase_order_type,purchase_quick"
68+
makepot: "true"
69+
name: test with Odoo
70+
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
71+
exclude: "purchase_cancel_reason,purchase_cancel_confirm,purchase_order_type,purchase_quick"
72+
name: test with OCB
73+
services:
74+
postgres:
75+
image: postgres:9.6
76+
env:
77+
POSTGRES_USER: odoo
78+
POSTGRES_PASSWORD: odoo
79+
POSTGRES_DB: odoo
80+
ports:
81+
- 5432:5432
82+
env:
83+
INCLUDE: "${{ matrix.include }}"
84+
EXCLUDE: "${{ matrix.exclude }}"
85+
steps:
86+
- uses: actions/checkout@v2
87+
with:
88+
persist-credentials: false
89+
- name: Install addons and dependencies
90+
run: oca_install_addons
91+
- name: Check licenses
92+
run: manifestoo -d . check-licenses
93+
- name: Check development status
94+
run: manifestoo -d . check-dev-status --default-dev-status=Beta
95+
- name: Initialize test db
96+
run: oca_init_test_database
97+
- name: Run tests
98+
run: oca_run_tests
99+
- uses: codecov/codecov-action@v1
100+
- name: Update .pot files
101+
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
102+
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}

.travis.yml

-73
This file was deleted.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
[![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=14.0)
3-
[![Build Status](https://travis-ci.com/OCA/purchase-workflow.svg?branch=14.0)](https://travis-ci.com/OCA/purchase-workflow)
3+
[![Pre-commit Status](https://github.com/OCA/purchase-workflow/actions/workflows/pre-commit.yml/badge.svg?branch=14.0)](https://github.com/OCA/purchase-workflow/actions/workflows/pre-commit.yml?query=branch%3A14.0)
4+
[![Build Status](https://github.com/OCA/purchase-workflow/actions/workflows/test.yml/badge.svg?branch=14.0)](https://github.com/OCA/purchase-workflow/actions/workflows/test.yml?query=branch%3A14.0)
45
[![codecov](https://codecov.io/gh/OCA/purchase-workflow/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/purchase-workflow)
56
[![Translation Status](https://translation.odoo-community.org/widgets/purchase-workflow-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/purchase-workflow-14-0/?utm_source=widget)
67

0 commit comments

Comments
 (0)