Revert "show best-upvoterate in header" #370
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: Build | |
on: | |
push: | |
branches: ["master"] | |
tags: [v*] | |
pull_request: | |
types: [opened, synchronize] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
# automatically cancel previous runs on the same PR | |
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre/67939898#67939898 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# https://github.com/actions/checkout/issues/626 | |
# This is correct, because we're using a merge queue (mergify) which only merges when built against the latest target branch. | |
# https://docs.mergify.com/actions/queue/ | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- run: go build *.go | |
- name: Check if working directory is clean | |
run: git diff --quiet --exit-code || (git status && false) | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# https://github.com/actions/checkout/issues/626 | |
# This is correct, because we're using a merge queue (mergify) which only merges when built against the latest target branch. | |
# https://docs.mergify.com/actions/queue/ | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.50.1 | |
- name: Check if go code is formatted | |
run: | | |
UNFORMATTED_FILES=$(gofmt -l .) | |
test -z $UNFORMATTED_FILES || (echo -e "Go code not formatted:\n$UNFORMATTED_FILES\n"; exit 1) |