feat: move to sveltekit #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e | |
on: | |
pull_request: | |
jobs: | |
# TODO: share setup action between test and e2e | |
e2e: | |
runs-on: ubuntu-latest | |
container: cypress/browsers:node18.12.0-chrome107 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# https://github.com/pnpm/action-setup | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.x.x | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-v1-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store-v1- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build core | |
working-directory: packages/core | |
run: pnpm build | |
- name: Configure test environment | |
working-directory: packages/viewer | |
run: | | |
echo "VITE_BUNDLE_HOST=http://localhost:5173" >> .env | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
browser: chrome | |
build: echo "Start runs build" | |
command: pnpm --filter viewer run cy:run | |
start: pnpm --filter viewer run cy:dev |