mirror of
https://github.com/davidebianchi/gswagger.git
synced 2025-12-23 23:38:43 -05:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Test and build
|
|
on:
|
|
pull_request:
|
|
types: [opened]
|
|
push:
|
|
jobs:
|
|
tests:
|
|
name: Test on go ${{ matrix.go_version }} os ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
go_version: ['1.24', '1.25']
|
|
os: [ubuntu-latest]
|
|
include:
|
|
- go_version: '1.25'
|
|
os: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Use golang ${{ matrix.go_version }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go_version }}
|
|
|
|
- name: Go version
|
|
run: |
|
|
go version
|
|
- name: Go get dependencies
|
|
run: |
|
|
go get -v -t -d ./...
|
|
- name: Run tests
|
|
run: |
|
|
go test ./... -count=1 -race -cover -coverprofile cover.out
|
|
- name: Build
|
|
run: |
|
|
go build -v .
|
|
- name: Send the coverage output
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
path-to-profile: cover.out
|
|
flag-name: Go-${{ matrix.go_version }}
|
|
parallel: true
|
|
|
|
post-tests:
|
|
runs-on: ubuntu-latest
|
|
needs: tests
|
|
steps:
|
|
- name: Close coverage report
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
parallel-finished: true
|