Migrate to spago@next #11
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: CI | |
on: | |
push: | |
branches: [master, dev] | |
pull_request: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# https://github.com/marketplace/actions/cache-apt-packages | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: protobuf-compiler | |
- name: Set up a PureScript toolchain | |
uses: purescript-contrib/setup-purescript@main | |
with: | |
purescript: "unstable" | |
purs-tidy: "latest" | |
- name: Cache PureScript dependencies | |
uses: actions/cache@v2 | |
with: | |
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}-2 | |
path: | | |
.spago | |
output | |
- name: Install dependencies | |
run: spago install | |
- name: Install plugin dependencies | |
run: spago -x spago-plugin.dhall install | |
- name: Install test dependencies | |
run: spago -x spago-test.dhall install | |
- name: Build plugin | |
run: spago -x spago-plugin.dhall build --no-install --purs-args '--censor-lib --strict --censor-codes='UserDefinedWarning'' | |
- run: mkdir -p ./test/generated | |
- name: Generate test from .proto | |
run: PATH=./bin:$PATH protoc --experimental_allow_proto3_optional --purescript_out=./test/generated test/*.proto | |
- name: Build test | |
run: spago -x spago-test.dhall build --no-install --purs-args '--censor-lib --censor-codes='UserDefinedWarning'' | |
- name: Run tests | |
run: spago -x spago-test.dhall test --no-install | |
# We're not running the conformance test because the conformance | |
# test runner is a pretty heavy build. |