-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (69 loc) · 2.16 KB
/
docker-example.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
73
74
75
76
77
78
79
80
81
82
name: docker-examples
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
name: build and test images
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
params:
- name: "tate"
resources-folder: "theia-app-theia-ext"
- name: "tave"
resources-folder: "theia-app-vscode-ext"
os: [ubuntu-latest]
node-version: [18]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install npm dependencies
run: |
cd docker
yarn --ignore-scripts
- name: Build trace viewer image (base version)
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
retry_wait_seconds: 15
max_attempts: 1
retry_on: error
command: |
cd docker
yarn build:docker:${{ matrix.params.name }}
on_retry_command: cd ..
- name: Run trace viewer image (base version)
run: |
cd docker
docker run --init -d -p 0.0.0.0:3000:4000 --name tv-${{ matrix.params.name }}-1 tv-${{ matrix.params.name }}
- name: Test trace viewer (base version)
run: |
cd docker
yarn --cwd ${{ matrix.params.resources-folder }} test
docker kill tv-${{ matrix.params.name }}-1
- name: Build trace viewer image (demo version)
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
retry_wait_seconds: 15
max_attempts: 1
retry_on: error
command: |
cd docker
yarn build:docker:${{ matrix.params.name }}-demo
on_retry_command: cd ..
- name: Run trace viewer image (demo version)
run: |
docker run --init -d -p 0.0.0.0:3000:4000 --name tv-${{ matrix.params.name }}-demo-1 tv-${{ matrix.params.name }}-demo
- name: Test trace viewer (demo version)
run: |
cd docker
yarn --cwd ${{ matrix.params.resources-folder }} test-demo
docker kill tv-${{ matrix.params.name }}-demo-1