-
Notifications
You must be signed in to change notification settings - Fork 1.4k
53 lines (49 loc) · 1.88 KB
/
lint-sample.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
# Copyright 2023 The Caramello-io Authors.
name: Sample Testdata Tests
on:
push:
pull_request:
jobs:
test:
name: "Testdata - make test"
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Clone the code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '~1.22'
- name: Remove pre-installed kustomize
run: sudo rm -f /usr/local/bin/kustomize
- name: Run make test for project-v4-with-deploy-image
run: cd testdata/project-v4-with-deploy-image && go mod tidy && make all && make test
- name: Run make test for project-v4-multigroup-with-deploy-image
run: cd testdata/project-v4-multigroup-with-deploy-image && go mod tidy && make all && make test
lint:
name: "Testdata - Lint"
runs-on: ubuntu-latest
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '~1.22'
- name: Clone the code
uses: actions/checkout@v4
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
working-directory: testdata/project-v4-with-deploy-image
args: --config .golangci.yml ./...
skip-cache: true # first lint action will handle
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
working-directory: testdata/project-v4-multigroup-with-deploy-image
args: --config .golangci.yml ./...
skip-cache: true # first lint action will handle