-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 1.77 KB
/
test.yml
File metadata and controls
62 lines (56 loc) · 1.77 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
name: test
on:
pull_request:
branches:
- "19.0*"
push:
branches:
- "19.0"
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --show-diff-on-failure --color=always
env:
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Detect unreleased dependencies
run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
result=0
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
grep "^[^#].*/" ${reqfile} || result=$?
if [ $result -eq 0 ] ; then
echo "Unreleased dependencies found in ${reqfile}."
exit 1
fi
fi
done
- name: Build CI image
env:
GITHUB_TOKEN: ${{ secrets.GLODOUK_ENTERPRISE_GITHUB_TOKEN }}
run: |
docker compose -f .ci/docker-compose.yaml build --build-arg GITHUB_TOKEN="$GITHUB_TOKEN"
- name: Run CI
run: |
docker compose -f .ci/docker-compose.yaml up --quiet-pull --exit-code-from odoo