Skip to content

98 - Fix examples tests #177

98 - Fix examples tests

98 - Fix examples tests #177

Workflow file for this run

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-native-app-flask-demo: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