Skip to content

Commit

Permalink
adding min go support and playing with test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
jalandis committed Jan 30, 2021
1 parent 007265f commit 0a24578
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ on:
- master

jobs:
build:
test:
name: Run tests
runs-on: ubuntu-latest
matrix:
go-version: [ 1.13.x, 1.14.x, 1.15.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
env:
LB_LIBRARY_PATH: ${HOME}/.local/include
steps:
Expand All @@ -30,7 +33,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.15"
go-version: ${{ matrix.go-version }}

- name: Install Protoc
run: ./scripts/install_protobuf
Expand All @@ -41,6 +44,7 @@ jobs:
path: |
~/.elm
~/.elm-analyse
~/.npm
key: ${{ runner.os }}-elm-${{ hashFiles('**/elm.json') }}
restore-keys: |
${{ runner.os }}-elm-
Expand All @@ -49,9 +53,9 @@ jobs:
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Protoc Cache
uses: actions/cache@v2
Expand All @@ -70,7 +74,6 @@ jobs:
run: |
npm install -g [email protected]
npm install -g elm-test
npm install -g elm-analyse
- name: All Tests
run: ./scripts/run_all_tests
2 changes: 1 addition & 1 deletion protoc-gen-elm/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module protoc-gen-elm

go 1.15
go 1.9

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion scripts/compile_test_plugin
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ readonly TEST_PLUGIN="${ROOT}/elm-protobuf-test"

cd "${ROOT}/protoc-gen-elm"
GO111MODULE=on go build -o "${TEST_PLUGIN}" ./cmd/protoc-gen-elm
cd ..
cd ..
2 changes: 1 addition & 1 deletion scripts/run_all_tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ readonly ROOT="$(git rev-parse --show-toplevel)"

"${ROOT}/scripts/compile_test_plugin"
"${ROOT}/scripts/run_elm_tests"
"${ROOT}/scripts/run_diff_tests"
"${ROOT}/scripts/run_diff_tests"

0 comments on commit 0a24578

Please sign in to comment.