chore(deps): bump github.com/docker/docker in the go_modules group (#41) #94
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-vet: | |
name: go-vet | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: setup-go | |
uses: ./.github/actions/setup-go | |
- name: Run go vet | |
run: go vet ./... | |
go-staticcheck: | |
name: go-staticcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: setup-go | |
uses: ./.github/actions/setup-go | |
- 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 | |
- id: setup-go | |
uses: ./.github/actions/setup-go | |
- name: Setup golines | |
run: go install github.com/segmentio/golines@latest | |
- name: Run golines | |
run: | | |
files=$(golines --ignored-dirs=vendor . --list-files) | |
if [ -n "${files}" ]; then | |
echo "The following files need reformatting:" | |
echo "${files}" | |
exit 1 | |
fi | |
gosec: | |
name: gosec | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: setup-go | |
uses: ./.github/actions/setup-go | |
- 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 | |
- id: setup-go | |
uses: ./.github/actions/setup-go | |
- name: Setup docker (missing on MacOS) | |
if: runner.os == 'macos' | |
run: | | |
brew install --HEAD colima | |
brew install docker | |
colima start --arch x86_64 | |
- name: Test Go build | |
run: go build -o bin/anchor main.go | |
- name: Test Go run | |
if: runner.os == 'ubuntu-latest' || runner.os == 'macos-latest' | |
run: go run main.go -y | |
- name: Run Tests | |
if: runner.os == 'ubuntu-latest' || runner.os == 'macos-latest' | |
run: make test |