Skip to content

Commit 6743111

Browse files
committed
[ADD] ci: init CI files for v18
1 parent 53c7417 commit 6743111

File tree

7 files changed

+491
-1
lines changed

7 files changed

+491
-1
lines changed

.github/workflows/stale.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: "0 12 * * 0"
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Stale PRs and issues policy
12+
uses: actions/stale@v9
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
# General settings.
16+
ascending: true
17+
remove-stale-when-updated: true
18+
# Pull Requests settings.
19+
# 120+30 day stale policy for PRs
20+
# * Except PRs marked as "no stale"
21+
days-before-pr-stale: 120
22+
days-before-pr-close: 30
23+
exempt-pr-labels: "no stale"
24+
stale-pr-label: "stale"
25+
stale-pr-message: >
26+
There hasn't been any activity on this pull request in the past 4 months, so
27+
it has been marked as stale and it will be closed automatically if no
28+
further activity occurs in the next 30 days.
29+
30+
If you want this PR to never become stale, please ask a PSC member to apply
31+
the "no stale" label.
32+
# Issues settings.
33+
# 180+30 day stale policy for open issues
34+
# * Except Issues marked as "no stale"
35+
days-before-issue-stale: 180
36+
days-before-issue-close: 30
37+
exempt-issue-labels: "no stale,needs more information"
38+
stale-issue-label: "stale"
39+
stale-issue-message: >
40+
There hasn't been any activity on this issue in the past 6 months, so it has
41+
been marked as stale and it will be closed automatically if no further
42+
activity occurs in the next 30 days.
43+
44+
If you want this issue to never become stale, please ask a PSC member to
45+
apply the "no stale" label.
46+
47+
# 15+30 day stale policy for issues pending more information
48+
# * Issues that are pending more information
49+
# * Except Issues marked as "no stale"
50+
- name: Needs more information stale issues policy
51+
uses: actions/stale@v9
52+
with:
53+
repo-token: ${{ secrets.GITHUB_TOKEN }}
54+
ascending: true
55+
only-labels: "needs more information"
56+
exempt-issue-labels: "no stale"
57+
days-before-stale: 15
58+
days-before-close: 30
59+
days-before-pr-stale: -1
60+
days-before-pr-close: -1
61+
remove-stale-when-updated: true
62+
stale-issue-label: "stale"
63+
stale-issue-message: >
64+
This issue needs more information and there hasn't been any activity
65+
recently, so it has been marked as stale and it will be closed automatically
66+
if no further activity occurs in the next 30 days.
67+
68+
If you think this is a mistake, please ask a PSC member to remove the "needs
69+
more information" label.

.github/workflows/test.yml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: tests
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- "18.0"
7+
push:
8+
branches:
9+
- "18.0"
10+
11+
env:
12+
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
13+
CI_PROJECT_NAMESPACE: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
14+
CI_PROJECT_NAME: ${{ github.event.pull_request.head.repo.name || github.event.repository.name }}
15+
16+
jobs:
17+
pre-commit-vauxoo:
18+
runs-on: ubuntu-latest
19+
name: pre-commit-vauxoo
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
ref: ${{ env.CI_COMMIT_SHA }}
24+
- name: Cache pre-commit and pip packages
25+
id: cache-pre-commit-pip
26+
uses: actions/cache@v3
27+
with:
28+
path: |
29+
~/.cache/pre-commit
30+
~/.cache/pip
31+
key: cache-pre-commit-pip
32+
- name: Install pre-commit-vauxoo
33+
run: pip install --upgrade pre-commit-vauxoo
34+
- name: Run pre-commit-vauxoo
35+
run: pre-commit-vauxoo
36+
no-dependency-files:
37+
runs-on: ubuntu-latest
38+
name: No dependency files
39+
steps:
40+
- uses: actions/checkout@v3
41+
with:
42+
ref: ${{ env.CI_COMMIT_SHA }}
43+
- name: Ensure dependency files don't exist
44+
run: |
45+
for reqfile in requirements.txt oca_dependencies.txt ; do
46+
if [ -f ${reqfile} ] ; then
47+
echo "Please avoid adding requirement files to this repo, because requirements will be installed in all project depending on this one."
48+
echo "If you need them for test to work, you can use test-${reqfile} instead of ${reqfile}"
49+
exit 1
50+
fi
51+
done
52+
build_docker:
53+
runs-on: ubuntu-latest
54+
name: Build Docker and test Odoo
55+
env:
56+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
57+
steps:
58+
- uses: actions/checkout@v3
59+
with:
60+
ref: ${{ env.CI_COMMIT_SHA }}
61+
persist-credentials: false
62+
- name: Cache pip packages
63+
id: cache-pip-build
64+
uses: actions/cache@v3
65+
with:
66+
path: ~/.cache/pip
67+
key: cache-pip-build
68+
- name: Set ssh keys
69+
run: |
70+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
71+
ssh-add - <<< "${{ secrets.PRIVATE_DEPLOY_KEY }}"
72+
mkdir -p ~/.ssh/
73+
ssh-keyscan -H git.vauxoo.com >> ~/.ssh/known_hosts
74+
- name: Install dependencies
75+
run: |
76+
pip install -U deployv vxci
77+
sudo apt update
78+
sudo apt install dos2unix
79+
- name: Build image
80+
env:
81+
PRIVATE_DEPLOY_KEY: ${{ secrets.PRIVATE_DEPLOY_KEY }}
82+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
83+
DOCKER_USER: ${{ secrets.DOCKER_USER }}
84+
ORCHEST_REGISTRY: ${{ secrets.ORCHEST_REGISTRY }}
85+
ORCHEST_TOKEN: ${{ secrets.ORCHEST_TOKEN }}
86+
run: |
87+
source variables.sh
88+
vxci check_keys
89+
vxci build_image --push_image
90+
- name: Test odoo image
91+
run: |
92+
source variables.sh
93+
slugified_branch=$(python -c "from vxci.common import slugify; print(slugify('${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}'))")
94+
source ${slugified_branch}/image_name.env
95+
vxci test_repo --allow_deprecated

.gitignore

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
*.DS_Store*
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
12+
env/
13+
bin/
14+
build/
15+
develop-eggs/
16+
dist/
17+
eggs/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
26+
# Installer logs
27+
pip-log.txt
28+
pip-delete-this-directory.txt
29+
30+
# Unit test / coverage reports
31+
htmlcov/
32+
.tox/
33+
.coverage
34+
.coveragerc
35+
.coverage.*
36+
et
37+
.cache
38+
nosetests.xml
39+
coverage.xml
40+
*,cover
41+
.hypothesis/
42+
43+
# Translations
44+
*.mo
45+
46+
# Pycharm
47+
.idea
48+
49+
# VS Code
50+
.vscode
51+
52+
# Mr Developer
53+
.mr.developer.cfg
54+
.project
55+
.pydevproject
56+
57+
# Rope
58+
.ropeproject
59+
60+
# Sphinx documentation
61+
docs/_build/
62+
63+
# Backup files
64+
*~
65+
*.swp
66+
67+
# docker JSON packages
68+
package-lock.json
69+
package.json
70+
71+
# docker node_modules
72+
node_modules/
73+
74+
# pre-commit-vauxoo
75+
.bandit*
76+
.config/
77+
.editorconfig
78+
.eslintrc*
79+
.flake8*
80+
.isort.cfg
81+
.oca_hooks*
82+
.pre-commit*.yaml
83+
.prettierrc.yml
84+
.pylintrc*
85+
bandit*.yaml
86+
doc8.ini
87+
pyproject.toml

0 commit comments

Comments
 (0)