spago install -p protobuf enums #19
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: | |
# https://github.com/marketplace/actions/cache-apt-packages | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: protobuf-compiler | |
# https://github.com/purescript-contrib/setup-purescript/ | |
- name: Set up a PureScript toolchain | |
uses: purescript-contrib/setup-purescript@main | |
with: | |
purescript: "unstable" | |
purs-tidy: "latest" | |
spago: "unstable" | |
# https://github.com/marketplace/actions/cache | |
- name: Cache PureScript dependencies | |
uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }}-2 | |
path: | | |
./plugin/.spago | |
./conformance/.spago | |
- name: Install dependencies | |
run: | | |
protoc --version | |
echo -n "node " | |
node --version | |
echo -n "purs " | |
purs --version | |
echo -n "spago " | |
spago --version | |
echo "" | |
spago install | |
- name: Build Plugin | |
run: | | |
cd plugin | |
spago build | |
- name: Test Plugin | |
# Need --experimental_allow_proto3_optional until the CI protoc is upgraded | |
run: | | |
protoc --experimental_allow_proto3_optional --plugin=bin/protoc-gen-purescript --purescript_out=./plugin/test/Test/generated ./plugin/test/*.proto | |
cd plugin | |
spago test | |
# - 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. | |