-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (33 loc) · 1.15 KB
/
test.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
name: "Tests"
on:
push:
branches:
- "**"
tags-ignore:
- "**"
pull_request:
jobs:
Tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Setup Go with Cache
uses: jfrog/.github/actions/install-go-with-cache@main
- name: Install Linter
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
shell: bash
- name: Test Plugins
run: |
# Configure Git
git config --global user.email "[email protected]"
git config --global user.name "jfrog-ecosystem"
# Run linter
golangci-lint run --enable govet,errcheck,gosimple,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars,gosec
# Run tests
go test -v ./... -timeout 0 -race
working-directory: pipelinesScripts/validator