Actions(deps): Bump actions/upload-artifact from 4.3.4 to 4.3.5 #307
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) 2020 Sebastian Pipping <sebastian@pipping.org> | |
# Licensed under GPL v3 or later | |
name: Build and test | |
on: | |
- pull_request | |
- push | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build_and_test: | |
name: Build and test | |
strategy: | |
fail-fast: false | |
matrix: | |
# The ideas is to cover both the oldest and the youngest supported | |
# version, there is no particualr need for anything in between. | |
go-version: ['1.20'] | |
runs-on: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build and test | |
run: |- | |
set -x | |
cd v2 | |
go build -race -v ./cmd/wait-for-it | |
./wait-for-it --help | |
./wait-for-it \ | |
--timeout 2 \ | |
--service github.com:80 \ | |
--service github.com:443 \ | |
-- \ | |
sh -c 'exit 123' \ | |
|| [ $? = 123 ] | |
go test -race -v -coverprofile=cover.out ./... | |
go tool cover -func=cover.out | tee cover-report.txt | |
go tool cover -html=cover.out -o cover-report.htm | |
[[ $(grep ^total: < cover-report.txt | awk '{print $3}') = 100.0% ]] | |
- name: "Require empty diff for: goimports" | |
run: |- | |
set -x | |
( cd /tmp && go install golang.org/x/tools/cmd/goimports@v0.8.0 ) | |
git ls-files \*.go | xargs goimports -w | |
git ls-files \*.go | xargs git diff --exit-code -- | |
- name: "Require empty diff for: gofmt" | |
run: |- | |
set -x | |
git ls-files \*.go | xargs gofmt -s -w | |
git ls-files \*.go | xargs git diff --exit-code -- | |
- name: "Require empty diff for: go mod tidy" | |
run: |- | |
set -x | |
cd v2 | |
go mod tidy -v | |
git diff --exit-code -- go.mod go.sum | |
- name: "Create articate for coverage report" | |
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 | |
with: | |
name: coverage__${{ matrix.runs-on }} | |
path: v2/cover* | |
if-no-files-found: error |