-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #762 from Som-Energia/imp_reusable_ga
Simplify and clean GA reusable workflow
- Loading branch information
Showing
1 changed file
with
5 additions
and
12 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 |
---|---|---|
|
@@ -27,6 +27,7 @@ env: | |
POSTGRES_USER: erp | ||
POSTGRES_PASSWORD: erp | ||
PYENV_ROOT: /home/runner/.pyenv | ||
ROOT_DIR_SRC: ${{github.workspace}}/.. | ||
|
||
jobs: | ||
build: | ||
|
@@ -82,21 +83,20 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_GA }} | ||
run: | | ||
export ROOT_DIR_SRC=${{github.workspace}}/.. | ||
git clone --depth 1 https://[email protected]/Som-Energia/erp.git -b ${{ inputs.erpbranch }} $ROOT_DIR_SRC/erp | ||
git clone --depth 1 https://[email protected]/Som-Energia/libFacturacioATR.git $ROOT_DIR_SRC/libFacturacioATR | ||
if [ ! -d "$ROOT_DIR_SRC/openerp_som_addons" ]; then | ||
git clone --depth 1 https://github.com/Som-Energia/openerp_som_addons.git $ROOT_DIR_SRC/openerp_som_addons | ||
git clone --depth 1 https://github.com/Som-Energia/openerp_som_addons.git $ROOT_DIR_SRC/openerp_som_addons | ||
fi | ||
if [ ! -d "$ROOT_DIR_SRC/somenergia-generationkwh" ]; then | ||
git clone --depth 1 https://github.com/Som-Energia/somenergia-generationkwh.git $ROOT_DIR_SRC/somenergia-generationkwh | ||
git clone --depth 1 https://github.com/Som-Energia/somenergia-generationkwh.git $ROOT_DIR_SRC/somenergia-generationkwh | ||
fi | ||
if [ ! -d "$ROOT_DIR_SRC/plantmeter" ]; then | ||
git clone --depth 1 https://github.com/Som-Energia/plantmeter.git $ROOT_DIR_SRC/plantmeter | ||
git clone --depth 1 https://github.com/Som-Energia/plantmeter.git $ROOT_DIR_SRC/plantmeter | ||
fi | ||
git clone --depth 1 https://github.com/Som-Energia/giscedata_facturacio_indexada_som.git $ROOT_DIR_SRC/giscedata_facturacio_indexada_som | ||
if [ ! -d "$ROOT_DIR_SRC/oorq" ]; then | ||
git clone --depth 1 https://github.com/gisce/oorq.git -b api_v5 $ROOT_DIR_SRC/oorq | ||
git clone --depth 1 https://github.com/gisce/oorq.git -b api_v5 $ROOT_DIR_SRC/oorq | ||
fi | ||
git clone --depth 1 https://github.com/gisce/poweremail.git $ROOT_DIR_SRC/poweremail2 | ||
git clone --depth 1 https://github.com/gisce/openerp-sentry.git -b v5_legacy $ROOT_DIR_SRC/openerp-sentry | ||
|
@@ -111,8 +111,6 @@ jobs: | |
run: | | ||
sudo apt-get --allow-releaseinfo-change update | ||
sudo apt-get install python2-dev python3-dev libxml2-dev libxmlsec1 libxmlsec1-dev libgdal-dev -y | ||
export ROOT_DIR_SRC=${{github.workspace}}/.. | ||
cd $ROOT_DIR_SRC | ||
cd $ROOT_DIR_SRC/libFacturacioATR | ||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`) | ||
pip install -e . | ||
|
@@ -123,7 +121,6 @@ jobs: | |
pip install -e . || "Not installing somenergia-generation Python package" | ||
cd $ROOT_DIR_SRC/plantmeter | ||
pip install -e . || "Not installing plantmeter Python package" | ||
cd $ROOT_DIR_SRC | ||
pip install -r $ROOT_DIR_SRC/erp/requirements-dev.txt | ||
pip install -r $ROOT_DIR_SRC/erp/requirements.txt | ||
|
@@ -136,26 +133,22 @@ jobs: | |
- name: Install dependencies for Python 2.7 | ||
if: matrix.python-version == '2.7' | ||
run: | | ||
export ROOT_DIR_SRC=${{github.workspace}}/.. | ||
git clone --depth 1 https://github.com/Som-Energia/somenergia-utils.git -b py2 $ROOT_DIR_SRC/somenergia-utils | ||
cd $ROOT_DIR_SRC/somenergia-utils | ||
pip install -e . || "Not installing somenergia-utils Python package" | ||
pip install "dm.xmlsec.binding<=1.3.2" | ||
- name: Link Addons | ||
run: | | ||
export ROOT_DIR_SRC=${{github.workspace}}/.. | ||
cd $ROOT_DIR_SRC/erp && ./tools/link_addons.sh | ||
- name: Run Tests | ||
env: | ||
ESIOS_TOKEN: ${{ secrets.ESIOS_TOKEN }} | ||
SRID: ${{ secrets.SRID }} | ||
run: | | ||
export ROOT_DIR_SRC=${{github.workspace}}/.. | ||
export CI_REPO=som-energia/openerp_som_addons | ||
export CI_PULL_REQUEST=${{ github.event.number }} | ||
export ROOT_DIR_SRC=${{github.workspace}}/.. | ||
export PYTHONPATH=${{github.workspace}}/../erp/server/bin:${{github.workspace}}/../erp/server/bin/addons:${{github.workspace}}/../erp/server/sitecustomize | ||
export OPENERP_PRICE_ACCURACY=6 | ||
export OORQ_ASYNC=False | ||
|