-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (80 loc) · 2.46 KB
/
test-examples.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
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
83
84
85
86
87
88
89
90
91
name: Test
on:
pull_request:
jobs:
test-examples:
name: Test Examples
runs-on: ubuntu-latest
env:
SHELL: /bin/bash
INSTALLED_EDM_VERSION: "3.4.0"
EDM_API_TOKEN: ${{ secrets.HATCHER_TOKEN }}
strategy:
matrix:
example: [
{
directory: "Minimal",
environment: "edge-minimal-example",
image: "quay.io/enthought/edge-minimal-example:1.2.0"
},
{
directory: "Panel",
environment: "edge-panel-example",
image: "quay.io/enthought/edge-panel-example:1.3.0"
},
{
directory: "Plotly Dash",
environment: "edge-plotly-dash-example",
image: "quay.io/enthought/edge-plotly-dash-example:1.3.0"
},
{
directory: "React",
environment: "edge-react-example",
image: "quay.io/enthought/edge-react-example:1.3.0"
},
{
directory: "Streamlit",
environment: "edge-streamlit-example",
image: "quay.io/enthought/edge-streamlit-example:1.3.0"
}
]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up EDM
uses: enthought/setup-edm-action@v2
with:
edm-version: ${{ env.INSTALLED_EDM_VERSION }}
- name: Bootstrap
shell: bash
run: |
export PATH="$HOME/edm/bin:$PATH"
set -e
cp "${{ github.workspace }}/.github/data/edm.yml" $HOME/.edm.yaml
edm envs create edm --version 3.8 --force
npm install -g configurable-http-proxy
- name: Build example
shell: bash
run: |
export PATH="$HOME/edm/bin:$PATH"
set -e
cd "${{ matrix.example.directory }}"
edm run -- python bootstrap.py --ci
edm run -e ${{ matrix.example.environment }} -- python -m ci build
- name: Run test
shell: bash
run: |
export PATH="$HOME/edm/bin:$PATH"
set -e
cd ${{ github.workspace }}/Tools
edm run -- python bootstrap.py --ci
edm run -e edge-testrun-tool -- python testrun.py ${{ matrix.example.image }}
- name: Archive logs if failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error-logs
path: |
${{ github.workspace }}/Tools/*.txt