Skip to content

Merge pull request #358 from EngineeringKiosk/dependabot/github_actio… #614

Merge pull request #358 from EngineeringKiosk/dependabot/github_actio…

Merge pull request #358 from EngineeringKiosk/dependabot/github_actio… #614

Workflow file for this run

name: Testing
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
testing:
name: Testing (Go)
runs-on: ubuntu-24.04
defaults:
run:
working-directory: app
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "1.25"
cache: false
- name: Run go version
run: go version
- name: Run Unit tests.
run: make test
golangci:
name: Linting (Go)
runs-on: ubuntu-24.04
defaults:
run:
working-directory: app
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "1.25"
cache: false
- name: Run go version
run: go version
- name: Run go fmt
if: runner.os != 'Windows'
run: diff -u <(echo -n) <(gofmt -d -s .)
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.4
working-directory: app
# golangci-lint contains only a set of rules from staticcheck.
# It's not the same thing as the staticcheck binary.
# Hence we deactivate it above and run it alone.
# See https://golangci-lint.run/usage/linters/#enabled-by-default
- name: Run staticcheck
run: make staticcheck
compile:
name: Compile application
runs-on: ubuntu-24.04
defaults:
run:
working-directory: app
needs: [testing, golangci]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Run go version
run: go version
- name: Build
run: make build