Skip to content

Test end-to-end

Test end-to-end #142

Workflow file for this run

name: Test
run-name: Test end-to-end
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
browser:
- electron
- chrome
- firefox
experimental:
- false
include:
- os: ubuntu-latest
name: Linux
- os: macos-latest
name: macOS
- os: windows-latest
name: Windows
- os: macos-latest
name: macOS
browser: webkit
- os: ubuntu-latest
name: Linux
browser: webkit
name: ${{ matrix.name }} - ${{ matrix.browser }}
runs-on: ${{ matrix.os }}
# Windows server is not working yet
continue-on-error: ${{ matrix.os == 'windows-latest' }}
steps:
- name: Setup firefox (macOS)
if: matrix.os == 'macos-latest' && matrix.browser == 'firefox'
uses: browser-actions/setup-firefox@v1
- name: Setup webkit (Linux)
if: matrix.os == 'ubuntu-latest' && matrix.browser == 'webkit'
run: npx playwright install-deps webkit
- uses: actions/checkout@v4
with:
submodules: true
- uses: leanprover/lean-action@v1
if: matrix.os != 'windows-latest'
with:
lake-package-directory: "demo/server/LeanProject"
use-mathlib-cache: false
auto-config: false
build: false
test: false
lint: false
- name: Install elan (Windows)
if: matrix.os == 'windows-latest'
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf > elan-init.sh
bash elan-init.sh -y
echo "$(realpath ~/.elan/bin)" >> $GITHUB_PATH
shell: bash
- uses: actions/setup-node@v4
- run: npm install
shell: bash
- run: npm run setup_demo
shell: bash
# # BUG: Somehow `lake` is not found when called through `npm` but it works on its own
# - name: Run npm run setup_demo (Windows)
# if: matrix.os == 'windows-latest'
# run: |
# npm run build
# cd demo
# npm install
# cd server/LeanProject
# lake build
# shell: bash
- name: Run tests
uses: cypress-io/github-action@v6
with:
start: npm start
wait-on: 'http://localhost:5173'
browser: ${{ matrix.browser }}
# - run: npm audit
# if: matrix.os == 'ubuntu-latest'
# continue-on-error: true