Skip to content

Add setuptools dependency to Minimal example #127

Add setuptools dependency to Minimal example

Add setuptools dependency to Minimal example #127

name: Test
on:
pull_request:
jobs:
test-edge-native-base:
name: Native Base Image
runs-on: ubuntu-latest
env:
SHELL: /bin/bash
INSTALLED_EDM_VERSION: "3.4.0"
HATCHER_TOKEN: ${{ secrets.HATCHER_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup NodeJS 16.x
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: |
**/package-lock.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
- 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"
edm -c ./.github/data/edm.yml -t ${{ secrets.HATCHER_TOKEN }} install --version 3.8 -y click pyyaml
npm install -g configurable-http-proxy
- name: Build and test edge-native-base
shell: bash
env:
CI_EDM_CONFIG: ${{ github.workspace }}/.github/data/edm.yml
CI_EDM_TOKEN: ${{ secrets.HATCHER_TOKEN }}
run: |
export PATH="$HOME/edm/bin:$PATH"
set -e
cd .dev/edge-native-base
edm run -- python bootstrap.py -c $CI_EDM_CONFIG -t $CI_EDM_TOKEN
edm run -e edge-native-base -- python -m ci dev test
edm run -e edge-native-base -- python -m ci container build --generate-bundle --edm-config $CI_EDM_CONFIG --edm-token $CI_EDM_TOKEN
edm run -e edge-native-base -- python -m ci container test
edm run -e edge-native-base -- python -m ci preflight test
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-example-minimal:1.0.0"
},
{
directory: "Panel",
environment: "edge-panel-example",
image: "quay.io/enthought/edge-panel-example:1.1.0"
},
{
directory: "Plotly Dash",
environment: "edge-plotly-dash-example",
image: "quay.io/enthought/edge-plotly-dash-example:1.1.0"
},
{
directory: "React",
environment: "edge-react-example",
image: "quay.io/enthought/edge-native-app-flask-demo:1.1.0"
},
{
directory: "Streamlit",
environment: "edge-streamlit-example",
image: "quay.io/enthought/edge-streamlit-example:1.1.0"
}
]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup NodeJS 16.x
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: |
**/package-lock.json
- 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: Preflight 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-preflight-tool -- python preflight.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