-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
491 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 12 * * 0" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Stale PRs and issues policy | ||
uses: actions/stale@v9 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# General settings. | ||
ascending: true | ||
remove-stale-when-updated: true | ||
# Pull Requests settings. | ||
# 120+30 day stale policy for PRs | ||
# * Except PRs marked as "no stale" | ||
days-before-pr-stale: 120 | ||
days-before-pr-close: 30 | ||
exempt-pr-labels: "no stale" | ||
stale-pr-label: "stale" | ||
stale-pr-message: > | ||
There hasn't been any activity on this pull request in the past 4 months, so | ||
it has been marked as stale and it will be closed automatically if no | ||
further activity occurs in the next 30 days. | ||
If you want this PR to never become stale, please ask a PSC member to apply | ||
the "no stale" label. | ||
# Issues settings. | ||
# 180+30 day stale policy for open issues | ||
# * Except Issues marked as "no stale" | ||
days-before-issue-stale: 180 | ||
days-before-issue-close: 30 | ||
exempt-issue-labels: "no stale,needs more information" | ||
stale-issue-label: "stale" | ||
stale-issue-message: > | ||
There hasn't been any activity on this issue in the past 6 months, so it has | ||
been marked as stale and it will be closed automatically if no further | ||
activity occurs in the next 30 days. | ||
If you want this issue to never become stale, please ask a PSC member to | ||
apply the "no stale" label. | ||
# 15+30 day stale policy for issues pending more information | ||
# * Issues that are pending more information | ||
# * Except Issues marked as "no stale" | ||
- name: Needs more information stale issues policy | ||
uses: actions/stale@v9 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
ascending: true | ||
only-labels: "needs more information" | ||
exempt-issue-labels: "no stale" | ||
days-before-stale: 15 | ||
days-before-close: 30 | ||
days-before-pr-stale: -1 | ||
days-before-pr-close: -1 | ||
remove-stale-when-updated: true | ||
stale-issue-label: "stale" | ||
stale-issue-message: > | ||
This issue needs more information and there hasn't been any activity | ||
recently, so it has been marked as stale and it will be closed automatically | ||
if no further activity occurs in the next 30 days. | ||
If you think this is a mistake, please ask a PSC member to remove the "needs | ||
more information" label. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: tests | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- "18.0" | ||
push: | ||
branches: | ||
- "18.0" | ||
|
||
env: | ||
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
CI_PROJECT_NAMESPACE: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | ||
CI_PROJECT_NAME: ${{ github.event.pull_request.head.repo.name || github.event.repository.name }} | ||
|
||
jobs: | ||
pre-commit-vauxoo: | ||
runs-on: ubuntu-latest | ||
name: pre-commit-vauxoo | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.CI_COMMIT_SHA }} | ||
- name: Cache pre-commit and pip packages | ||
id: cache-pre-commit-pip | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pre-commit | ||
~/.cache/pip | ||
key: cache-pre-commit-pip | ||
- name: Install pre-commit-vauxoo | ||
run: pip install --upgrade pre-commit-vauxoo | ||
- name: Run pre-commit-vauxoo | ||
run: pre-commit-vauxoo | ||
no-dependency-files: | ||
runs-on: ubuntu-latest | ||
name: No dependency files | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.CI_COMMIT_SHA }} | ||
- name: Ensure dependency files don't exist | ||
run: | | ||
for reqfile in requirements.txt oca_dependencies.txt ; do | ||
if [ -f ${reqfile} ] ; then | ||
echo "Please avoid adding requirement files to this repo, because requirements will be installed in all project depending on this one." | ||
echo "If you need them for test to work, you can use test-${reqfile} instead of ${reqfile}" | ||
exit 1 | ||
fi | ||
done | ||
build_docker: | ||
runs-on: ubuntu-latest | ||
name: Build Docker and test Odoo | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.CI_COMMIT_SHA }} | ||
persist-credentials: false | ||
- name: Cache pip packages | ||
id: cache-pip-build | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: cache-pip-build | ||
- name: Set ssh keys | ||
run: | | ||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||
ssh-add - <<< "${{ secrets.PRIVATE_DEPLOY_KEY }}" | ||
mkdir -p ~/.ssh/ | ||
ssh-keyscan -H git.vauxoo.com >> ~/.ssh/known_hosts | ||
- name: Install dependencies | ||
run: | | ||
pip install -U deployv vxci | ||
sudo apt update | ||
sudo apt install dos2unix | ||
- name: Build image | ||
env: | ||
PRIVATE_DEPLOY_KEY: ${{ secrets.PRIVATE_DEPLOY_KEY }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
ORCHEST_REGISTRY: ${{ secrets.ORCHEST_REGISTRY }} | ||
ORCHEST_TOKEN: ${{ secrets.ORCHEST_TOKEN }} | ||
run: | | ||
source variables.sh | ||
vxci check_keys | ||
vxci build_image --push_image | ||
- name: Test odoo image | ||
run: | | ||
source variables.sh | ||
slugified_branch=$(python -c "from vxci.common import slugify; print(slugify('${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}'))") | ||
source ${slugified_branch}/image_name.env | ||
vxci test_repo --allow_deprecated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
*.DS_Store* | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coveragerc | ||
.coverage.* | ||
et | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Pycharm | ||
.idea | ||
|
||
# VS Code | ||
.vscode | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# Backup files | ||
*~ | ||
*.swp | ||
|
||
# docker JSON packages | ||
package-lock.json | ||
package.json | ||
|
||
# docker node_modules | ||
node_modules/ | ||
|
||
# pre-commit-vauxoo | ||
.bandit* | ||
.config/ | ||
.editorconfig | ||
.eslintrc* | ||
.flake8* | ||
.isort.cfg | ||
.oca_hooks* | ||
.pre-commit*.yaml | ||
.prettierrc.yml | ||
.pylintrc* | ||
bandit*.yaml | ||
doc8.ini | ||
pyproject.toml |
Oops, something went wrong.