add CI + dependabot + cleanup #3
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: "CI" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
shellcheck: | |
name: Shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@2.0.0 | |
with: | |
ignore_paths: "./vendor/**" | |
prettier: | |
name: Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prettify code | |
uses: creyD/prettier_action@v4.3 | |
with: | |
dry: true | |
prettier_options: --log-level debug --check . | |
hadolint: | |
name: hadolint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hadolint/hadolint-action@v3.1.0 | |
with: | |
dockerfile: "Dockerfile.template" | |
typocheck: | |
name: Spell Check with Typos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Actions Repository | |
uses: actions/checkout@v4 | |
- name: Check for typos | |
uses: crate-ci/typos@master | |
with: | |
config: ./.typos.toml | |
go-staticcheck: | |
name: go-staticcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Setup staticcheck | |
run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Run staticcheck | |
run: staticcheck ./... | |
golines: | |
name: golines | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Setup golines | |
run: go install github.com/segmentio/golines@latest | |
- name: Run golines | |
run: | | |
golines --write-output --ignored-dirs=vendor . | |
gosec: | |
name: gosec | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Setup Gosec Security Scanner | |
run: go install github.com/securego/gosec/v2/cmd/gosec@latest | |
- name: Run Gosec Security Scanner | |
run: make gosec | |
test-go-build-run: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
name: Go build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: go mod | |
run: make mod | |
- name: Test Go build | |
run: make build | |
- name: Test Go run | |
run: go run cmd/*.go -y | |
- name: Run Tests | |
run: make test |