Skip to content

Commit

Permalink
ci: add test setting
Browse files Browse the repository at this point in the history
  • Loading branch information
shuntaka9576 committed May 30, 2022
1 parent 9d81d19 commit 3bc6da1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "test"
on: ["push", "pull_request"]

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 "::set-output name=value::${versions}"
ci:
name: "Run CI"
needs: go-versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ${{fromJson(needs.go-versions.outputs.versions)}}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: ${{ matrix.go-version }}
- run: "go test ./..."

0 comments on commit 3bc6da1

Please sign in to comment.