forked from sogno-platform/dpsim
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.29 KB
/
run_villas_example.yaml
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
name: Run a VILLASnode example using multiple containers
on:
workflow_call:
inputs:
compose_file_path:
description: 'Path to the multi-container compose file'
required: true
type: string
container_commands:
description: 'docker exec commands for running tests in the containers'
required: true
type: string
continue_on_error:
description: 'Do not fail test when the container commands fail'
required: false
default: false
type: boolean
jobs:
run-villas-example:
name: Run a VILLASnode example across multiple containers
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore build archive
uses: actions/download-artifact@v3
with:
name: build-cache
path: ${{ github.workspace }}/build
- name: Start containers
run: cd ${{ inputs.compose_file_path }} && docker-compose -p dpsim-compose up -d
- name: Run container commands
timeout-minutes: 5
continue-on-error: ${{ inputs.continue_on_error }}
shell: bash
run: ${{ inputs.container_commands }}
- name: Stop containers
if: ${{ always() }}
run: cd ${{ inputs.compose_file_path }} && docker-compose -p dpsim-compose down