Skip to content

PR-1

PR-1 #30

Workflow file for this run

name: CI
on:
pull_request:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
permissions: {}
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: '1.20'
cache: false # golangci-lint caching doesn't seem to get along with setup-go caching
- uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0
with:
version: v1.51.2
args: -v --config=.golangci-lint.yml
shellcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install shellcheck
run: |
tag="v0.9.0"; \
url_base='https://github.com/koalaman/shellcheck/releases/download'; \
tar_file="${tag}/shellcheck-${tag}.linux.x86_64.tar.xz"; \
wget "${url_base}/${tar_file}" -O - | tar xJf -; \
sudo mv "shellcheck-${tag}/shellcheck" /bin/
- run: ci/shellcheck.sh
env:
WORKDIR: ${{ github.workspace }}
test-go:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: '1.20'
- run: ./ci/test.sh
env:
WORKDIR: ${{ github.workspace }}
gosec:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: '1.20'
- run: go install github.com/securego/gosec/v2/cmd/gosec@v2.13.0
- run: gosec -quiet -exclude-dir=third-party ./...