From 0a24578b81e710131b60ff2257bb19b7229913bb Mon Sep 17 00:00:00 2001 From: John Landis Date: Sat, 30 Jan 2021 18:12:57 -0500 Subject: [PATCH] adding min go support and playing with test matrix --- .github/workflows/run-tests.yml | 15 +++++++++------ protoc-gen-elm/go.mod | 2 +- scripts/compile_test_plugin | 2 +- scripts/run_all_tests | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 47af3c6..ccdc955 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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: @@ -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 @@ -41,6 +44,7 @@ jobs: path: | ~/.elm ~/.elm-analyse + ~/.npm key: ${{ runner.os }}-elm-${{ hashFiles('**/elm.json') }} restore-keys: | ${{ runner.os }}-elm- @@ -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 @@ -70,7 +74,6 @@ jobs: run: | npm install -g elm@latest-0.19.1 npm install -g elm-test - npm install -g elm-analyse - name: All Tests run: ./scripts/run_all_tests diff --git a/protoc-gen-elm/go.mod b/protoc-gen-elm/go.mod index 47e18d3..f7dca40 100644 --- a/protoc-gen-elm/go.mod +++ b/protoc-gen-elm/go.mod @@ -1,6 +1,6 @@ module protoc-gen-elm -go 1.15 +go 1.9 require ( github.com/gogo/protobuf v1.3.2 diff --git a/scripts/compile_test_plugin b/scripts/compile_test_plugin index 6281835..02bcd69 100755 --- a/scripts/compile_test_plugin +++ b/scripts/compile_test_plugin @@ -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 .. \ No newline at end of file +cd .. diff --git a/scripts/run_all_tests b/scripts/run_all_tests index 8a4dd5f..f8f49e2 100755 --- a/scripts/run_all_tests +++ b/scripts/run_all_tests @@ -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" \ No newline at end of file +"${ROOT}/scripts/run_diff_tests"