-
Notifications
You must be signed in to change notification settings - Fork 107
53 lines (53 loc) · 1.49 KB
/
ci.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
name: Default Meshery Istio Workflow
on:
push:
branches:
- "master"
tags:
- "v*"
paths-ignore:
- "docs/**"
- ".github/**"
pull_request:
branches:
- master
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
args: --timeout=5m
tests:
# needs: [lint, error_check, static_check, vet, sec_check]
name: Tests
runs-on: ubuntu-22.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Create cluster using KinD
uses: engineerd/[email protected]
with:
version: "v0.11.1"
- run: |
export CURRENTCONTEXT="$(kubectl config current-context)"
echo "current-context:" ${CURRENTCONTEXT}
export KUBECONFIG="${HOME}/.kube/config"
echo "environment-kubeconfig:" ${KUBECONFIG}
GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go test -v ./...