-
Notifications
You must be signed in to change notification settings - Fork 240
72 lines (59 loc) · 1.95 KB
/
model-run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name : Sipnet Model Run
on :
pull_request:
# allow manual triggering
workflow_dispatch:
schedule:
# run Thursday 4:30 AM UTC
- cron: '30 4 * * 4'
jobs:
test:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get -y install docker-compose
- name: Add Volumes to Executor
run: |
cp docker-compose.dev.yml docker-compose.override.yml
- name: Build Containers
run: |
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
sleep 30
docker run --rm --network pecan_pecan pecan/db:ci
docker run --rm --network pecan_pecan --volume pecan_pecan:/data --env FQDN=docker pecan/data:develop
docker image rm pecan/db:ci pecan/data:develop
- name: Run required containers
run: |
docker compose up -d sipnet executor
- name: Check if containers are running # This will be updated soon to a loop
run: |
docker ps
sleep 50
- name: Run SIPNET
run: |
docker compose exec --workdir /pecan/tests executor R CMD ../web/workflow.R --settings test.xml