Skip to content

Merge pull request #1 from actforgood/dependabot/github_actions/actio… #12

Merge pull request #1 from actforgood/dependabot/github_actions/actio…

Merge pull request #1 from actforgood/dependabot/github_actions/actio… #12

Workflow file for this run

name: Build
on:
push:
branches: ['*']
tags: ['v*']
pull_request:
branches: ['*']
jobs:
build:
name: Build
timeout-minutes: 5
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Load cached dependencies
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: make setup
- name: Run linter
run: make lint
- name: Run unit tests
run: make clean cover
- name: Upload coverage to coveralls.io
if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.19.x'
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: cover.out
flag-name: ${{ runner.os }}/Go-${{ matrix.go-version }}