@@ -10,48 +10,70 @@ jobs:
1010 runs-on: ubuntu-latest
1111
1212 steps:
13− - uses: actions/checkout@v2
1413 # https://github.com/marketplace/actions/cache-apt-packages
14+ - uses: actions/checkout@v4
1515 - uses: awalsh128/cache-apt-pkgs-action@latest
1616 with:
1717 packages: protobuf-compiler
1818
19+ # https://github.com/purescript-contrib/setup-purescript/
1920 - name: Set up a PureScript toolchain
2021 uses: purescript-contrib/setup-purescript@main
2122 with:
2223 purescript: "unstable"
2324 purs-tidy: "latest"
25+ spago: "unstable"
2426
27+ # https://github.com/marketplace/actions/cache
2528 - name: Cache PureScript dependencies
26− uses: actions/cache@v2
29+ uses: actions/cache@v4
2730 with:
28− key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}-2
31+ key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }}-2
2932 path: |
30− .spago
31− output
33+ ./plugin/.spago
34+ ./conformance/.spago
3235
3336 - name: Install dependencies
34− run: spago install
37+ run: |
38+ protoc --version
39+ echo -n "node "
40+ node --version
41+ echo -n "purs "
42+ purs --version
43+ echo -n "spago "
44+ spago --version
45+ echo ""
46+ spago install
3547
36− - name: Install plugin dependencies
37− run: spago -x spago-plugin.dhall install
48+ - name: Build Plugin
49+ run: |
50+ cd plugin
51+ spago build
3852
39− - name: Install test dependencies
40− run: spago -x spago-test.dhall install
53+ - name: Test Plugin
54+ # Need --experimental_allow_proto3_optional until the CI protoc is upgraded
55+ run: |
56+ protoc --experimental_allow_proto3_optional --plugin=bin/protoc-gen-purescript --purescript_out=./plugin/test/Test/generated ./plugin/test/*.proto
57+ cd plugin
58+ spago test
4159
42− - name: Build plugin
43− run: spago -x spago-plugin.dhall build --no-install --purs-args '--censor-lib --strict --censor-codes='UserDefinedWarning''
60+ # - name: Install test dependencies
61+ # run: spago -x spago-test.dhall install
4462
45− - run: mkdir -p ./test/generated
63+ # - name: Build plugin
64+ # run: spago -x spago-plugin.dhall build --no-install --purs-args '--censor-lib --strict --censor-codes='UserDefinedWarning''
4665
47− - name: Generate test from .proto
48− run: PATH=./bin:$PATH protoc --experimental_allow_proto3_optional --purescript_out=./test/generated test/*.proto
66+ # - run: mkdir -p ./test/generated
4967
50− - name: Build test
51− run: spago -x spago-test.dhall build --no-install --purs-args '--censor-lib --censor-codes='UserDefinedWarning''
68+ # - name: Generate test from .proto
69+ # run: PATH=./bin:$PATH protoc --experimental_allow_proto3_optional --purescript_out=./test/generated test/*.proto
5270
53− - name: Run tests
54− run: spago -x spago-test.dhall test --no-install
71+ # - name: Build test
72+ # run: spago -x spago-test.dhall build --no-install --purs-args '--censor-lib --censor-codes='UserDefinedWarning''
73+
74+ # - name: Run tests
75+ # run: spago -x spago-test.dhall test --no-install
5576
5677 # We're not running the conformance test because the conformance
57− # test runner is a pretty heavy build.
78+ # test runner is a pretty heavy build.
79+