Test editor end-to-end #85
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: Test | |
run-name: Test editor end-to-end | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] # replace "main" with the default branch | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Linux | |
os: ubuntu-latest | |
- name: macOS | |
os: macos-latest | |
- name: Windows | |
os: windows-latest | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: leanprover/lean-action@v1 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
lake-package-directory: "demo/server/LeanProject" | |
use-mathlib-cache: false | |
build: true | |
test: false | |
lint: false | |
- name: Install elan (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
set -exo pipefail | |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf > elan-init.sh | |
sh elan-init.sh -y | |
source ~/.profile | |
elan toolchain install stable | |
elan default stable | |
echo "$HOME/.elan/bin" >> $GITHUB_PATH | |
source ~/.profile | |
- name: Run lake build (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
cd demo/server/LeanProject | |
lake build | |
- name: Install elan (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
curl -O --location https://raw.githubusercontent.com/leanprover/elan/master/elan-init.ps1 | |
echo 1 | powershell -ExecutionPolicy Bypass -f elan-init.ps1 | |
del elan-init.ps1 | |
shell: pwsh | |
- name: Add elan to PATH (Windows) | |
if: matrix.os == 'windows-latest' | |
run: (Resolve-Path ~/.elan/bin).Path >> $Env:GITHUB_PATH | |
shell: pwsh | |
- name: Run lake build (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
CD demo\server\LeanProject | |
lake build | |
shell: pwsh | |
- uses: actions/setup-node@v4 | |
# Install npm dependencies, cache them correctly | |
# and run all Cypress tests | |
- name: Run tests | |
uses: cypress-io/github-action@v6 | |
with: | |
start: npm start | |
wait-on: 'http://localhost:5173' | |
- run: npm audit | |
if: matrix.os == 'ubuntu-latest' | |
continue-on-error: true |