-
Notifications
You must be signed in to change notification settings - Fork 16
61 lines (49 loc) 路 1.41 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Lint
on:
- push
- pull_request
jobs:
lint-swift:
name: Lint (Swift)
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Homebrew dependencies
run: brew install mint
- name: Restore Mint cache
id: mint-cache
uses: actions/cache@v1
with:
path: /usr/local/lib/mint/
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
- name: Install Mint dependencies
if: steps.mint-cache.outputs.cache-hit != 'true'
run: mint bootstrap
- name: Run linters
run: |
mint run swiftlint --quiet --strict
mint run swiftformat --lint .
lint-go:
name: Lint (Go)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./HTMLConverter/
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Restore Go Modules cache
id: go-mod-cache
uses: actions/cache@v1
with:
path: ~/go/pkg/mod/
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Run linters
run: docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.25.1 golangci-lint run