Fix double task execution with quiet
runner option
#15
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
# Copyright (c) 2019-present Sven Greb <development@svengreb.de> | |
# This source code is licensed under the MIT license found in the license file. | |
# GitHub Action Workflow for continuous integration jobs. | |
# See https://docs.github.com/en/actions and https://github.com/features/actions for more details. | |
name: ci-go | |
on: | |
push: | |
paths: | |
- "**.go" | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
paths: | |
- "**.go" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print metadata and context information | |
run: | | |
echo "Git SHA: $GITHUB_SHA" | |
echo "Git Ref: $GITHUB_REF" | |
echo "Workflow Actor: $GITHUB_ACTOR" | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Go 1.17 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.17.x" | |
- name: "Run golangci-lint" | |
# The official golangci-lint action created and maintained by the golangci-lint project. | |
# See https://github.com/golangci/golangci-lint-action for more details. | |
uses: golangci/golangci-lint-action@v2.5.2 | |
with: | |
version: v1.43 | |
test: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
steps: | |
- name: Print metadata and context information | |
run: | | |
echo "Git SHA: $GITHUB_SHA" | |
echo "Git Ref: $GITHUB_REF" | |
echo "Workflow Actor: $GITHUB_ACTOR" | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
# Ensure to fetch all history for all tags and branches for other steps, e.g. when bootstrapping the tools, | |
# otherwise this can result in errors when trying to query for repository metadata like the tag. | |
# See https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches for more details. | |
fetch-depth: 0 | |
- name: Install Go 1.17 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.17.x" | |
- name: Bootstrap tools | |
run: go run make.go bootstrap | |
- name: Cache Go dependencies and build outputs | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run unit tests with coverage and race detector | |
run: go run make.go testCover testRace | |
- name: Run integration tests | |
run: go run make.go testIntegration |