-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: break out functional tests into actions
As we more functional tests are added, the functional_tests.yml file will become unwieldy. Breaking out the functional tests into actions gives us more flexibility in how we run the tests (on PRs, on release, etc.)
- Loading branch information
1 parent
9bfe755
commit f9061b4
Showing
3 changed files
with
73 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Lake Init Functional Tests' | ||
description: 'Run `lean action` on Lake package generated by `lake init`' | ||
inputs: | ||
lake-init-arguments: | ||
description: 'arguments to pass to `lake init`' | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
# TODO: once `lean-action` supports just setup, use it here | ||
- name: install elan | ||
run: | | ||
set -o pipefail | ||
curl -sSfL https://github.com/leanprover/elan/releases/download/v1.4.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./elan-init -y --default-toolchain leanprover/lean4:v4.8.0-rc1 | ||
echo "$HOME/.elan/bin" >> "$GITHUB_PATH" | ||
shell: bash | ||
|
||
|
||
- name: create lake package with `lake init ${{ inputs.lake-init-arguments }}` | ||
run: | | ||
lake init ${{ inputs.lake-init-arguments }} | ||
ls | ||
pwd | ||
shell: bash | ||
|
||
- name: "run `lean-action`" | ||
uses: ./ | ||
with: | ||
test: false | ||
use-github-cache: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'Lake Test Functional Tests' | ||
description: 'Run `lean-action` with `lake test` and a dummy test_runner' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
# TODO: once `lean-action` supports just setup, use it here | ||
- name: install elan | ||
run: | | ||
set -o pipefail | ||
curl -sSfL https://github.com/leanprover/elan/releases/download/v1.4.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz | ||
./elan-init -y --default-toolchain leanprover/lean4:v4.8.0-rc1 | ||
echo "$HOME/.elan/bin" >> "$GITHUB_PATH" | ||
- name: create lake package | ||
run: | | ||
lake init dummytest | ||
ls | ||
- name: create dummy test | ||
run: | | ||
{ | ||
echo "@[test_runner]" | ||
echo "script dummy_test do" | ||
echo " println! \"Running fake tests...\"" | ||
echo " println! \"Fake tests passed!\"" | ||
echo " return 0" | ||
} >> lakefile.lean | ||
- name: "run `lean-action` with `lake test`" | ||
uses: ./ | ||
with: | ||
test: true | ||
use-github-cache: false |
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