-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Model Parameters and Create Script file
- Loading branch information
1 parent
237ce47
commit c95dc05
Showing
2 changed files
with
31 additions
and
56 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
- master | ||
- develop | ||
- Docker-Stack-Testing | ||
- new-branch-for-docker-testing | ||
|
||
|
||
tags: | ||
|
@@ -33,32 +34,14 @@ jobs: | |
# DOCKER STACK TESTS | ||
# ---------------------------------------------------------------------- | ||
Stack-Test: | ||
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build') | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
name: | ||
- sipnet_r136 | ||
|
||
include: | ||
- name: sipnet_r136 | ||
modelID: "1000000014" | ||
siteID: "772" | ||
siteName: "Niwot Ridge Forest/LTER NWT1 (US-NR1)" | ||
pftName: "temperate.deciduous" | ||
metData: "AmerifluxLBL" | ||
startDate: "2004/01/01" | ||
endDate: "2004/12/31" | ||
|
||
#Add more models below in the above format | ||
|
||
|
||
|
||
|
||
|
||
|
||
services: | ||
postgres: | ||
|
@@ -83,23 +66,25 @@ jobs: | |
- name: Build and run containers | ||
run: | | ||
docker system prune --all --force | ||
cp docker/env.example .env | ||
echo "COMPOSE_PROJECT_NAME=pecan" >> .env | ||
echo "PECAN_VERSION=develop" >> .env | ||
echo "UID=$(id -u)" >> .env | ||
echo "GID=$(id -g)" >> .env | ||
docker-compose up -d postgres | ||
docker run --rm --network pecan_pecan pecan/db | ||
docker-compose run bety user guestuser guestuser "Guest User" [email protected] 4 4 | ||
docker-compose run bety user carya illinois "Carya Demo User" [email protected] 1 1 | ||
docker run --rm --network pecan_pecan --volume pecan_pecan:/data --env FQDN=docker pecan/data:develop | ||
docker run --rm --network pecan_pecan --volume pecan_pecan:/data pecan/data:develop chown -R "$(id -u).$(id -g)" /data | ||
cp docker/env.example .env | ||
echo "COMPOSE_PROJECT_NAME=pecan" >> .env | ||
echo "PECAN_VERSION=develop" >> .env | ||
docker run --user="$(id -u)" --rm --network pecan_pecan --volume pecan_pecan:/data --env FQDN=docker pecan/data:develop | ||
docker-compose up -d | ||
- name: Wait for services to start | ||
run: | | ||
|
@@ -109,42 +94,14 @@ jobs: | |
sleep 20 | ||
docker-compose ps | ||
sleep 20 | ||
- name: Display running containers | ||
run: | | ||
docker-compose ps | ||
docker network ls | ||
docker network inspect bridge | ||
# run tests against the full docker stack | ||
- name: Run cURL command | ||
run: | | ||
curl -v -L -X POST -H "Host: pecan.localhost" \ | ||
-F 'hostname=docker' \ | ||
-F 'modelid=${{ matrix.modelID }}' \ | ||
-F 'sitegroupid=1' \ | ||
-F 'siteid=${{ matrix.siteID }}' \ | ||
-F 'sitename=${{ matrix.siteName }}' \ | ||
-F 'pft[]=${{ matrix.pftName }}' \ | ||
-F 'start=${{ matrix.startDate }}' \ | ||
-F 'end=${{ matrix.endDate }}' \ | ||
-F 'input_met=${{ matrix.metData }}' \ | ||
-F 'email=' \ | ||
-F 'notes=' \ | ||
'http://172.17.0.1/pecan/04-runpecan.php' | ||
curl -v -L -H "Host: pecan.localhost" \ | ||
'http://172.17.0.1/pecan/08-finished.php?workflowid=99000000001&hostname=docker&loglines=100' | ||
sleep 200 | ||
curl -v -L -H "Host: pecan.localhost" \ | ||
'http://172.17.0.1/pecan/08-finished.php?workflowid=99000000001&hostname=docker&loglines=100' | ||
curl -v -L -H "Host: pecan.localhost" \ | ||
'http://172.17.0.1/pecan/dataset.php?workflowid=99000000001&type=file&name=out/99000000001/sipnet.out' | ||
- name: Run Integration Test | ||
run: git update-index --chmod=+x ./tests/Docker-Stack-Test.sh |
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,18 @@ | ||
curl -v -L -X POST -H "Host: pecan.localhost" \ | ||
-F 'hostname=docker' \ | ||
-F 'modelid=1000000014' \ | ||
-F 'sitegroupid=1' \ | ||
-F 'siteid=756' \ | ||
-F 'sitename=Southern Pine (Subcategory), Duke Forest Pine ' \ | ||
-F 'pft[]=temperate.coniferous' \ | ||
-F 'start=2004/01/01' \ | ||
-F 'end=2004/12/31' \ | ||
-F 'input_met=CRUNCEP' \ | ||
-F 'email=' \ | ||
-F 'notes=' \ | ||
'http://172.17.0.1/pecan/04-runpecan.php' | ||
|
||
sleep 200 | ||
|
||
curl -v -L -H "Host: pecan.localhost" \ | ||
'http://172.17.0.1/pecan/dataset.php?workflowid=99000000001&type=file&name=out/99000000001/sipnet.out' |