Add automatic github action testing #2
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: Build and test | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install elan | |
run: | | |
set -o pipefail | |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- --default-toolchain none -y | |
~/.elan/bin/lean --version | |
echo "$HOME/.elan/bin" >> $GITHUB_PATH | |
- name: Cache `.lake` folder | |
id: cache-lake | |
uses: actions/cache@v4 | |
with: | |
path: .lake | |
key: ${{ runner.os }}-lake | |
- name: Compile and test | |
run: | | |
lake update # download cache of mathlib docs. | |
lake test |