mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-19 13:48:20 +02:00
Rework lint github actions
This commit is contained in:
parent
86138a0d8c
commit
1ea5dfc9f1
40
.github/workflows/lint.yml
vendored
40
.github/workflows/lint.yml
vendored
@ -1,31 +1,29 @@
|
|||||||
|
---
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# The "build" workflow
|
golangci-lint:
|
||||||
lint:
|
name: lint
|
||||||
# The type of runner that the job will run on
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
args: --timeout 30m
|
||||||
|
|
||||||
|
prettier-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# Setup Go
|
- name: Prettify code
|
||||||
- name: Setup Go
|
uses: creyD/prettier_action@v4.0
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
with:
|
||||||
go-version: "1.16.3" # The Go version to download (if necessary) and use.
|
prettier_options: >-
|
||||||
|
--check '**/*.{ts,js,md,yaml,yml,sass,css,scss,html}'
|
||||||
# Install all the dependencies
|
only_changed: false
|
||||||
- name: Install dependencies
|
dry: true
|
||||||
run: |
|
|
||||||
go version
|
|
||||||
go install golang.org/x/lint/golint@latest
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y make
|
|
||||||
|
|
||||||
- name: Run lint
|
|
||||||
run: make lint
|
|
||||||
|
Loading…
Reference in New Issue
Block a user