From 0cd474d058c80a4670e30ba7859254955b9264e8 Mon Sep 17 00:00:00 2001 From: jojo43 Date: Tue, 3 May 2022 14:07:34 +0900 Subject: [PATCH] Add a job with go-version-file --- .github/workflows/versions.yml | 16 ++++++++++++++++ __tests__/data/go.mod | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 __tests__/data/go.mod diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 79683ec..12c711e 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -50,6 +50,22 @@ jobs: - name: Verify Go run: go version + go-version-file: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v3 + - name: Setup Go and check latest + uses: ./ + with: + go-version-file: __tests__/data/go.mod + - name: verify go + run: __tests__/verify-go.sh 1.14 + shell: bash + setup-versions-from-manifest: name: Setup ${{ matrix.go }} ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/__tests__/data/go.mod b/__tests__/data/go.mod new file mode 100644 index 0000000..dea3480 --- /dev/null +++ b/__tests__/data/go.mod @@ -0,0 +1,12 @@ +module example.com/mymodule + +go 1.14 + +require ( + example.com/othermodule v1.2.3 + example.com/thismodule v1.2.3 + example.com/thatmodule v1.2.3 +) + +replace example.com/thatmodule => ../thatmodule +exclude example.com/thismodule v1.3.0