28 lines
943 B
YAML
28 lines
943 B
YAML
name: Build
|
|
on: [push]
|
|
jobs:
|
|
gobuild:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '1.21.x'
|
|
- name: Build
|
|
run: go build -v ./*/
|
|
- name: Display Go version
|
|
run: go version
|
|
- name: List files in the repository
|
|
run: |
|
|
ls ${{ github.workspace }}
|
|
- name: Test with Go
|
|
run: go test -json > TestResults-${{ matrix.go-version }}.json
|
|
- name: Upload Go test results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Go-results-${{ matrix.go-version }}
|
|
path: TestResults-${{ matrix.go-version }}.json
|
|
- run: echo "This job's status is ${{ job.status }}."
|