Skip to content

Commit be46106

Browse files
authored
Merge pull request #414 from camptocamp/14-use-gh-actions
[14.0] Use GH actions to run tests
2 parents 77936da + 67916c8 commit be46106

4 files changed

Lines changed: 73 additions & 4 deletions

File tree

.copier-answers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
22
_commit: v1.5.1
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
88
odoo_version: 14.0
99
rebel_module_groups: []
10-
repo_description: 'TODO: add repo description.'
10+
repo_description: Advanced async jobs management for Odoo
1111
repo_name: queue
1212
repo_slug: queue
1313
travis_apt_packages: []

.github/workflows/test.yml

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

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=14.0)
2-
[![Build Status](https://travis-ci.com/OCA/queue.svg?branch=14.0)](https://travis-ci.com/OCA/queue)
2+
[![Pre-commit Status](https://github.com/OCA/queue/actions/workflows/pre-commit.yml/badge.svg?branch=14.0)](https://github.com/OCA/queue/actions/workflows/pre-commit.yml?query=branch%3A14.0)
3+
[![Build Status](https://github.com/OCA/queue/actions/workflows/test.yml/badge.svg?branch=14.0)](https://github.com/OCA/queue/actions/workflows/test.yml?query=branch%3A14.0)
34
[![codecov](https://codecov.io/gh/OCA/queue/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/queue)
45
[![Translation Status](https://translation.odoo-community.org/widgets/queue-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/queue-14-0/?utm_source=widget)
56

67
<!-- /!\ do not modify above this line -->
78

89
# queue
910

10-
TODO: add repo description.
11+
Advanced async jobs management for Odoo
1112

1213
<!-- /!\ do not modify below this line -->
1314

0 commit comments

Comments
 (0)