mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-22 07:57:34 +00:00
replace linter actions with nix to ensure consistent version (#1773)
This commit is contained in:
parent
b60ee9db54
commit
f581d4d9c0
33
.github/workflows/lint.yml
vendored
33
.github/workflows/lint.yml
vendored
@ -26,17 +26,12 @@ jobs:
|
|||||||
integration_test/
|
integration_test/
|
||||||
config-example.yaml
|
config-example.yaml
|
||||||
|
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
uses: golangci/golangci-lint-action@v2
|
run: nix develop --command -- golangci-lint run --new-from-rev=${{github.event.pull_request.base.sha}} --out-format=github-actions .
|
||||||
with:
|
|
||||||
version: v1.51.2
|
|
||||||
|
|
||||||
# Only block PRs on new problems.
|
|
||||||
# If this is not enabled, we will end up having PRs
|
|
||||||
# blocked because new linters has appared and other
|
|
||||||
# parts of the code is affected.
|
|
||||||
only-new-issues: true
|
|
||||||
|
|
||||||
prettier-lint:
|
prettier-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -61,20 +56,20 @@ jobs:
|
|||||||
**/*.scss
|
**/*.scss
|
||||||
**/*.html
|
**/*.html
|
||||||
|
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
- name: Prettify code
|
- name: Prettify code
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
uses: creyD/prettier_action@v4.3
|
run: nix develop --command -- prettier --no-error-on-unmatched-pattern --ignore-unknown --check **/*.{ts,js,md,yaml,yml,sass,css,scss,html}
|
||||||
with:
|
|
||||||
prettier_options: >-
|
|
||||||
--check **/*.{ts,js,md,yaml,yml,sass,css,scss,html}
|
|
||||||
only_changed: false
|
|
||||||
dry: true
|
|
||||||
|
|
||||||
proto-lint:
|
proto-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: bufbuild/buf-setup-action@v1.7.0
|
|
||||||
- uses: bufbuild/buf-lint-action@v1
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
with:
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
input: "proto"
|
|
||||||
|
- name: Buf lint
|
||||||
|
run: nix develop --command -- buf lint proto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user