jx/.gitea/workflows/lint.yaml

40 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-03-27 17:48:07 +00:00
name: Lint
on:
- push
jobs:
lint:
name: golangci-lint
runs-on: ubuntu-latest
2024-05-25 21:32:40 +00:00
container:
env:
SSH_AUTH_SOCK: /tmp/ssh.sock
ENVIRONMENT: dev
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/etc/gitconfig:/etc/gitconfig:ro"
- "/${{ env.SSH_AUTH_SOCK }}:/tmp/ssh.sock"
- "/${{ vars.GITEA_WORKSPACE }}:/go/src"
2024-05-25 23:41:43 +00:00
- "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts"
- "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro"
- "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro"
2024-05-25 21:32:40 +00:00
- "/etc/ssl/certs:/etc/ssl/certs:ro"
options: --cpus 20
2024-03-27 17:48:07 +00:00
steps:
- uses: actions/setup-go@v4
with:
2024-05-25 20:24:28 +00:00
go-version: "1.22.1"
2024-03-27 17:48:07 +00:00
cache: false
- name: Check out code
uses: actions/checkout@v3
2024-05-26 03:55:01 +00:00
- run: apt-get -y update && apt-get -y install libluajit-5.1-dev
2024-05-25 20:31:48 +00:00
- name: Get packages
run: go get ./...
2024-03-27 17:48:07 +00:00
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55