diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5220b14 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - master + - 'stage/**' + pull_request: + +jobs: + build: + name: ${{ matrix.name || 'Build' }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: ${{ matrix.shell || 'sh' }} + strategy: + matrix: + include: + - name: Ubuntu + os: ubuntu-latest + - name: MacOS + os: macos-latest + - name: Windows + os: windows-latest + shell: msys2 {0} + # complete all jobs + fail-fast: false + steps: + - name: Install MSYS2 (Windows) + if: matrix.os == 'windows-latest' + uses: msys2/setup-msys2@v2 + with: + path-type: inherit + install: curl unzip + - name: Install Elan + shell: bash -euo pipefail {0} + run: | + curl -sSfL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y --default-toolchain none + echo "$HOME/.elan/bin" >> $GITHUB_PATH + - name: Checkout + uses: actions/checkout@v2 + - name: Check Lean + run: lean --version + - name: Build + run: lake build + - name: Upload Build + continue-on-error: true + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }} + path: build + - name: Test + run: ./test.sh diff --git a/Partax/Test.lean b/Partax/Test.lean new file mode 100644 index 0000000..e74b1cf --- /dev/null +++ b/Partax/Test.lean @@ -0,0 +1,3 @@ +import Partax +import Partax.Test.Basic +import Partax.Test.LCompile diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..802eaf5 --- /dev/null +++ b/test.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euxo pipefail + +${LAKE:-lake} build Partax.Test +find tests -type f -exec ${LAKE:-lake} env lean {} \; +echo "all done" diff --git a/test/compile.lean b/tests/compile.lean similarity index 100% rename from test/compile.lean rename to tests/compile.lean diff --git a/test/compileLean.lean b/tests/compileLean.lean similarity index 100% rename from test/compileLean.lean rename to tests/compileLean.lean diff --git a/test/example.lean b/tests/example.lean similarity index 100% rename from test/example.lean rename to tests/example.lean diff --git a/test/lcompile.lean b/tests/lcompile.lean similarity index 100% rename from test/lcompile.lean rename to tests/lcompile.lean diff --git a/test/parse.lean b/tests/parse.lean similarity index 100% rename from test/parse.lean rename to tests/parse.lean