Skip to content

add link to live data #274

add link to live data

add link to live data #274

Workflow file for this run

name: End-to-end tests
on:
pull_request:
jobs:
# TODO: share setup action between test and e2e
e2e:
runs-on: ubuntu-latest
container: cypress/browsers:node-20.10.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
# 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-
- uses: actions/cache@v3
name: Setup Cypress cache
with:
path: /github/home/.cache/Cypress
key: ${{ runner.os }}-cypress-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-cypress-v2-
- name: Install dependencies
run: pnpm install
- name: Build core
working-directory: packages/core
run: pnpm build
- name: Build viewer
working-directory: packages/viewer
run: |
VITE_BUNDLE_HOST=http://localhost:4173 pnpm run build
- name: Copy fixtures
working-directory: packages/viewer
# The viewer build is configured to load data from the local server's
# static assets, so we populate the main branch location with fixture
# data, for deterministic testing.
run: |
mkdir -p dist/refs/heads
cp cypress/fixtures/main.min.json dist/refs/heads/main.json
- name: Cypress run
uses: cypress-io/github-action@v6
with:
browser: chrome
build: echo "Start runs build"
command: pnpm --filter viewer run cy:run --config baseUrl=http://localhost:4173
start: pnpm --filter viewer run preview
record: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}