Skip to content

webcontainer-ecosystem-ci #10

webcontainer-ecosystem-ci

webcontainer-ecosystem-ci #10

Workflow file for this run

# integration tests for webcontainer ecosystem projects - scheduled or manual run for all suites
name: webcontainer-ecosystem-ci
env:
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
on:
schedule:
- cron: "0 5 * * 1,3,5" # monday,wednesday,friday 5AM
workflow_dispatch:
inputs:
version:
description: "@webcontainer/api version to use"
required: true
type: string
default: "latest"
suite:
description: "testsuite to run"
type: choice
default: "all"
options:
- all
- starters
- vitest-in-webcontainer
- webcontainer-test
jobs:
resolve_suites:
runs-on: ubuntu-latest
outputs:
suites: ${{ steps.set-suites.outputs.suites }}
steps:
- id: set-suites
run: |
if [[ '${{ inputs.suite }}' == 'all' ]]
then
echo 'suites=${{ toJson(inputs.suites.options) }}' >> $GITHUB_OUTPUT
else
echo 'suites=[${{ inputs.suite }}]' >> $GITHUB_OUTPUT
fi
test-ecosystem:
timeout-minutes: 60
runs-on: ubuntu-latest
needs:
- resolve_suites
strategy:
matrix:
suite: ${{ fromJson(needs.resolve_suites.outputs.suites) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
id: setup-node
continue-on-error: true
- run: corepack enable
- run: pnpm --version
- run: pnpm i --frozen-lockfile
- run: >-
pnpm run test
--release ${{ inputs.version || github.event.client_payload.version }}
${{ matrix.suite }}
id: ecosystem-ci-run