mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[IMP] update dotfiles [ci skip]
This commit is contained in:
29
.github/workflows/pre-commit.yml
vendored
29
.github/workflows/pre-commit.yml
vendored
@@ -2,7 +2,12 @@ name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "15.0*"
|
||||
push:
|
||||
branches:
|
||||
- "15.0"
|
||||
- "15.0-ocabot-*"
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
@@ -10,11 +15,21 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- name: Get python version
|
||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
# The pylint-odoo version we use here does not support python 3.10
|
||||
# https://github.com/OCA/oca-addons-repo-template/issues/80
|
||||
# We also need to pin to an older version of python for older odoo versions
|
||||
# where we are not using black > 21. Older black versions won't work with
|
||||
# Python 3.9.8+, and we can't bump black without reformatting.
|
||||
python-version: "3.10"
|
||||
- uses: pre-commit/action@v2.0.0
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --all-files --show-diff-on-failure --color=always
|
||||
- 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
|
||||
|
||||
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: test Odoo addons
|
||||
name: tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -6,19 +6,40 @@ on:
|
||||
- "15.0*"
|
||||
push:
|
||||
branches:
|
||||
- "15.0*"
|
||||
- "15.0"
|
||||
- "15.0-ocabot-*"
|
||||
|
||||
jobs:
|
||||
unreleased-deps:
|
||||
runs-on: ubuntu-latest
|
||||
name: Detect unreleased dependencies
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
name: ${{ matrix.name }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- container: ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest
|
||||
makepot: "true"
|
||||
name: test with Odoo
|
||||
- container: ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest
|
||||
name: test with OCB
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:9.6
|
||||
|
||||
Reference in New Issue
Block a user