Skip to content

Merge pull request #4 from Songmu/github-actions #1

Merge pull request #4 from Songmu/github-actions

Merge pull request #4 from Songmu/github-actions #1

Workflow file for this run

name: test
on:
pull_request:
branches:
- "**"
push:
branches:
- master
jobs:
go-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.value }}
steps:
- id: versions
run: |
versions=$(curl -s 'https://go.dev/dl/?mode=json' | jq -c 'map(.version[2:])')
echo "value=${versions}" >> $GITHUB_OUTPUT
test:
needs: go-version

Check failure on line 20 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yaml (Line: 20, Col: 12): Job 'test' depends on unknown job 'go-version'.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
go-version: ${{fromJson(needs.go-versions.outputs.versions)}}
steps:
- name: setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: checkout
uses: actions/checkout@v3
- name: test
run: go test ./...