test: add E2E test for auto go.mod detection

Related issue: #523
This commit is contained in:
raeperd 2025-10-12 17:44:55 +09:00
parent 612cee1af9
commit ec93c40362
1 changed files with 22 additions and 0 deletions

View File

@ -142,6 +142,28 @@ jobs:
run: __tests__/verify-go.sh 1.21 run: __tests__/verify-go.sh 1.21
shell: bash shell: bash
auto-detect-go-mod:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
steps:
- uses: actions/checkout@v5
- name: Create go.mod in workspace root
run: |
cat > go.mod << 'EOF'
module github.com/actions/setup-go
go 1.21
EOF
shell: bash
- name: Setup Go with auto-detection
uses: ./
- name: Verify go version
run: __tests__/verify-go.sh 1.21
shell: bash
setup-versions-from-manifest: setup-versions-from-manifest:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy: