Bump docker/metadata-action from 4.6.0 to 5.0.0 #649
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 and test | |
on: | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: go.mod | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Run coverage | |
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... -coverpkg ./... | |
build-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
path: airbot | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: airbot/go.mod | |
cache-dependency-path: airbot/go.sum | |
- name: Build Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: airbot/Dockerfile | |
push: false | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: go.mod | |
- name: Check format | |
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi | |
- name: Lint | |
uses: golangci/[email protected] | |
with: | |
version: latest | |
args: "--timeout 3m" | |
- name: Vet | |
run: go vet | |
lint-markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Lint markdown | |
uses: DavidAnson/[email protected] |