protection de l'API pour des commandes concurrentes sur la même branche #1897
Workflow file for this run
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
name: Coveralls | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
# branches: [ master ] | |
jobs: | |
Caches: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: apt update | |
run: | | |
sudo apt-get update | |
- name: Install gdal | |
run: | | |
sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update | |
sudo apt-get install python3-gdal | |
- name: Install libgdal | |
run: | | |
sudo apt-get update && sudo apt-get install libgdal-dev | |
- name: pip install | |
run: | | |
pip install 'pip<23' | |
pip install numpy | |
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version` | |
- name: create cache RGB | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGB -g "regress/data/regress_graphe.gpkg" -t graphe -z 0 -r 1 | |
- name: update cache RGB | |
run: | | |
python scripts/update_cache.py -R "regress/data/update/RGB/*.tif" -c cache_regress_RGB -g "regress/data/regress_graphe.gpkg" -t graphe -z 0 -r 1 | |
- name: create cache RGB no mtd | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGB_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 -r 1 | |
- name: update cache RGB no mtd | |
run: | | |
python scripts/update_cache.py -R "regress/data/update/RGB/*.tif" -c cache_regress_RGB_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 -r 1 | |
- name: create cache RGBIR | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGBIR -g "regress/data/regress_graphe.gpkg" -t graphe -z 0 -r 1 | |
- name: update cache RGBIR | |
run: | | |
python scripts/update_cache.py -R "regress/data/update/RGB/*.tif" -I "regress/data/update/IR/*.tif" -c cache_regress_RGBIR -g "regress/data/regress_graphe.gpkg" -t graphe -z 0 -r 1 | |
- name: create cache RGBIR no mtd | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGBIR_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 -r 1 | |
- name: update cache RGBIR no mtd | |
run: | | |
python scripts/update_cache.py -R "regress/data/update/RGB/*.tif" -I "regress/data/update/IR/*.tif" -c cache_regress_RGBIR_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 -r 1 | |
- name: create cache IR | |
run: | | |
python scripts/create_cache.py -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_IR -g "regress/data/regress_graphe.gpkg" -t graphe -z 0 -r 1 | |
- name: update cache IR | |
run: | | |
python scripts/update_cache.py -I "regress/data/update/IR/*.tif" -c cache_regress_IR -g "regress/data/regress_graphe.gpkg" -t graphe -z 0 -r 1 | |
- name: create cache IR no mtd | |
run: | | |
python scripts/create_cache.py -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_IR_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 -r 1 | |
- name: update cache IR no mtd | |
run: | | |
python scripts/update_cache.py -I "regress/data/update/IR/*.tif" -c cache_regress_IR_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 -r 1 | |
- name: create cache RGB gpao | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGB_gpao -g "regress/data/regress_graphe.gpkg" -t graphe | |
- name: create cache RGB gpao no mtd | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGB_gpao_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 | |
- name: create cache RGBIR gpao | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGBIR_gpao -g "regress/data/regress_graphe.gpkg" -t graphe | |
- name: create cache RGBIR gpao no mtd | |
run: | | |
python scripts/create_cache.py -R "regress/data/RGB/*.tif" -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_RGBIR_gpao_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 | |
- name: create cache IR gpao | |
run: | | |
python scripts/create_cache.py -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_IR_gpao -g "regress/data/regress_graphe.gpkg" -t graphe | |
- name: create cache IR gpao no mtd | |
run: | | |
python scripts/create_cache.py -I "regress/data/IR/*.tif" -o ressources/LAMB93_5cm.json -c cache_regress_IR_gpao_no_mtd -g "regress/data/regress_graphe_nomtd.gpkg" -t graphe -z 1 | |
- name: check cache RGB | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGB" -s cache_regress_RGB | |
- name: check cache RGB no mtd | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGB_no_mtd" -s cache_regress_RGB_no_mtd | |
- name: check cache RGBIR | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGBIR" -s cache_regress_RGBIR | |
- name: check cache RGBIR no mtd | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGBIR_no_mtd" -s cache_regress_RGBIR_no_mtd | |
- name: check cache IR | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_IR" -s cache_regress_IR | |
- name: check cache IR no mtd | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_IR_no_mtd" -s cache_regress_IR_no_mtd | |
- name: check cache RGB gpao | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGB_gpao" -s cache_regress_RGB_gpao | |
- name: check cache RGB gpao no mtd | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGB_gpao_no_mtd" -s cache_regress_RGB_gpao_no_mtd | |
- name: check cache RGBIR gpao | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGBIR_gpao" -s cache_regress_RGBIR_gpao | |
- name: check cache RGBIR gpao no mtd | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_RGBIR_gpao_no_mtd" -s cache_regress_RGBIR_gpao_no_mtd | |
- name: check cache IR gpao | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_IR_gpao" -s cache_regress_IR_gpao | |
- name: check cache IR gpao no mtd | |
run: | | |
python scripts/check_cache.py -r "cache_test/cache_test_IR_gpao_no_mtd" -s cache_regress_IR_gpao_no_mtd | |
API: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgis/postgis | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: initialize DB | |
env: | |
PGHOST: localhost | |
PGPORT: 5432 | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
run: | | |
psql -c "CREATE DATABASE packo" | |
psql -d packo -f sql/packo.sql | |
- name: install | |
run: npm install | |
- name: API run test | |
env: | |
PGHOST: localhost | |
PGPORT: 5432 | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
PGDATABASE: packo | |
DEBUG: | |
run: | | |
npm run coveralls-api | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage/lcov.info |