-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@Tecnativa TT22772
- Loading branch information
Showing
5 changed files
with
237 additions
and
68 deletions.
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,72 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
# See https://crontab.guru/weekly | ||
- cron: 0 0 * * 0 | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
- name: Set PY | ||
run: | ||
echo "::set-env name=PY::$(python -c 'import hashlib, | ||
sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
- uses: pre-commit/[email protected] | ||
|
||
build-test-push: | ||
runs-on: ubuntu-latest | ||
needs: pre-commit | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Test modern Odoo versions with latest Postgres version | ||
pg_version: | ||
- "13" | ||
- "12" | ||
- "11" | ||
- "10" | ||
- "9.6" | ||
env: | ||
# Indicates what's the equivalent to tecnativa/postgres-autoconf:latest image | ||
LATEST_RELEASE: "14.0" | ||
# Variables found by default in Docker Hub builder | ||
DOCKER_REPO: tecnativa/postgres-autoconf | ||
DOCKER_TAG: ${{ matrix.pg_version }}-alpine | ||
GIT_SHA1: ${{ github.sha }} | ||
steps: | ||
# Prepare | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
- run: pip install -r tests/ci-requirements.txt | ||
# Build images | ||
- run: ./hooks/build | ||
# Test | ||
- run: ./tests/test.py -v | ||
# Push | ||
- name: push to docker hub | ||
if: github.repository == 'Tecnativa/postgres-autoconf' && github.ref == 'refs/heads/master' | ||
env: | ||
REGISTRY_HOST: docker.io | ||
DOCKER_HUB_TOKEN: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
run: ./hooks/push | ||
- name: push to github registry | ||
if: github.repository == 'Tecnativa/postgres-autoconf' && github.ref == 'refs/heads/master' | ||
env: | ||
DOCKER_REPO_SUFFIX: /postgres-autoconf | ||
REGISTRY_HOST: docker.pkg.github.com | ||
DOCKER_HUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKER_HUB_USERNAME: ${{ github.actor }} | ||
run: ./hooks/push |
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 |
---|---|---|
@@ -1,2 +1,156 @@ | ||
tests/*.pem | ||
tests/*.srl | ||
|
||
|
||
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,python | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,python | ||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
pytestdebug.log | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
doc/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
### VisualStudioCode ### | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
*.code-workspace | ||
|
||
### VisualStudioCode Patch ### | ||
# Ignore all local history of files | ||
.history | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python |
This file was deleted.
Oops, something went wrong.
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
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