Do away with HTTP server and instead used a Go based File server for hosting binaries #1338
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
name: Validate PRs | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.20 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Check go mod status | |
run: | | |
make gomod_tidy | |
if [[ ! -z $(git status -s) ]] | |
then | |
echo "Go mod state is not clean, commit these files before proceed" | |
git status -s | |
git diff | |
exit 1 | |
fi | |
- name: Check cobra command documentation is up-to-date | |
run: | | |
make cmd-docs | |
if [[ ! -z $(git status -s) ]] | |
then | |
echo "command-documentation is out of date (run make cmd-docs)." | |
exit 1 | |
fi | |
- name: Build Binary | |
run: | | |
pwd | |
ls -l | |
make bin | |
- name: Run Go Tests | |
run: make test | |
- name: Check format | |
run: | | |
if [[ $(go fmt `go list ./... | grep -v vendor`) ]]; then | |
echo "not well formatted sources are found" | |
exit 1 | |
fi | |
- name: Generate coverage report | |
run: | | |
go test `go list ./... | grep -v test/e2e | grep -v vendor` -coverprofile=coverage.txt -covermode=atomic | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.txt | |
flags: unittests | |
name: codecov-umbrella |