mirror of
https://github.com/kopia/kopia.git
synced 2026-03-26 10:01:32 -04:00
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
name: Lint
|
|
on:
|
|
pull_request:
|
|
branches: [ master ]
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
env:
|
|
# environment variables shared between build steps
|
|
# do not include sensitive credentials and tokens here, instead pass them
|
|
# directly to tools that need them to limit the blast radius in case one of them
|
|
# becomes compromised and leaks credentials to external sites.
|
|
# required by Makefile
|
|
UNIX_SHELL_ON_WINDOWS: true
|
|
# set (to any value other than false) to trigger random unicode filenames testing (logs may be difficult to read)
|
|
ENABLE_UNICODE_FILENAMES: ${{ secrets.ENABLE_UNICODE_FILENAMES }}
|
|
# set (to any value other than false) to trigger very long filenames testing
|
|
ENABLE_LONG_FILENAMES: ${{ secrets.ENABLE_LONG_FILENAMES }}
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
name: Lint
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
- id: govulncheck
|
|
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
|
|
with:
|
|
cache: false
|
|
go-version-input: '1.25.7'
|
|
# An explicit Go version is needed for govulncheck-action since internally
|
|
# it uses an outdated setup-go@v5.0 action that does not respect the 'toolchain'
|
|
# directive in the 'go.mod' file.
|
|
#go-version-file: 'go.mod'
|
|
repo-checkout: false
|
|
- name: Lint
|
|
run: make lint
|
|
- name: Check Locks
|
|
run: make check-locks
|
|
- name: Prettier
|
|
run: make check-prettier
|