Skip to content

Update go.yml

Update go.yml #7

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.18', '1.21.x']
steps:
- uses: actions/checkout@v4
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 5.0
mongodb-replica-set: test-rs
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get .
- name: Test with Go
run: go test -v -coverprofile=coverage.out ./...
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
file: coverage.out
flag-name: Go-${{ matrix.go-version }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true