mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
Add a job with go-version-file
This commit is contained in:
parent
676a55b643
commit
0cd474d058
2 changed files with 28 additions and 0 deletions
16
.github/workflows/versions.yml
vendored
16
.github/workflows/versions.yml
vendored
|
@ -50,6 +50,22 @@ jobs:
|
||||||
- name: Verify Go
|
- name: Verify Go
|
||||||
run: go version
|
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:
|
setup-versions-from-manifest:
|
||||||
name: Setup ${{ matrix.go }} ${{ matrix.os }}
|
name: Setup ${{ matrix.go }} ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
12
__tests__/data/go.mod
Normal file
12
__tests__/data/go.mod
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue