Created
May 21, 2020 17:43
-
-
Save pyrmont/565756c9a68879a2fca2966ca3e74fa3 to your computer and use it in GitHub Desktop.
A simple GitHub Actions workflow for CI testing with Janet
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 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout project | |
uses: actions/checkout@v2 | |
- name: find latest version of janet | |
uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: janet-lang/janet | |
releases_only: true | |
prefix: 'v' | |
id: janet-ver | |
- name: download janet | |
run: curl -LO https://github.com/janet-lang/janet/releases/download/${{ steps.janet-ver.outputs.tag }}/janet-${{ steps.janet-ver.outputs.tag }}-linux.tar.gz | |
- name: extract janet | |
run: tar -xvzf janet-${{ steps.janet-ver.outputs.tag }}-linux.tar.gz | |
- name: add directory to path | |
run: echo "::add-path::janet-${{ steps.janet-ver.outputs.tag }}-linux" | |
- name: make modules directory | |
run: mkdir modules | |
- name: set JANET_PATH | |
run: echo "::set-env name=JANET_PATH::modules" | |
- name: set JANET_LIBPATH | |
run: echo "::set-env name=JANET_LIBPATH::janet-${{ steps.janet-ver.outputs.tag }}-linux" | |
- name: set JANET_HEADERPATH | |
run: echo "::set-env name=JANET_HEADERPATH::janet-${{ steps.janet-ver.outputs.tag }}-linux" | |
- name: install dependencies | |
run: /usr/bin/env jpm deps | |
- name: run tests | |
run: /usr/bin/env jpm test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment