build: improve mage build experience #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2023 Iván Szkiba | |
# | |
# SPDX-License-Identifier: MIT | |
name: Quality | |
on: [push, pull_request] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: "go.mod" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Lint | |
uses: magefile/mage-action@v1 | |
with: | |
version: latest | |
args: tools lint | |
test: | |
name: Test | |
needs: [lint] | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{matrix.platform}} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: "go.mod" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Test | |
uses: magefile/mage-action@v1 | |
with: | |
version: latest | |
args: test | |
- name: Upload Coverage | |
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }} | |
uses: codecov/codecov-action@v2 | |
- name: Generate Go Report Card | |
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }} | |
uses: creekorful/goreportcard-action@v1.0 |