Skip to content

Commit 4d69ccf

Browse files
committed
set up ci
1 parent 538c378 commit 4d69ccf

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: AppConfiguration-GoProvider CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'release/**'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'release/**'
12+
13+
jobs:
14+
build:
15+
name: Build and Test
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
go-version: ['1.20', '1.21', '1.22', '1.23']
21+
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v3
25+
26+
- name: Set up Go ${{ matrix.go-version }}
27+
uses: actions/setup-go@v4
28+
with:
29+
go-version: ${{ matrix.go-version }}
30+
cache: true
31+
32+
- name: Install dependencies
33+
run: go mod download
34+
35+
- name: Build
36+
run: go build -v ./...
37+
38+
- name: Run tests
39+
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
40+
41+
lint:
42+
name: Lint
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Check out code
46+
uses: actions/checkout@v3
47+
48+
- name: Set up Go
49+
uses: actions/setup-go@v4
50+
with:
51+
go-version: '1.23'
52+
cache: true
53+
54+
- name: golangci-lint
55+
uses: golangci/golangci-lint-action@v3
56+
with:
57+
version: latest
58+
args: --timeout=5m
59+
60+
security-scan:
61+
name: Security Scan
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Check out code
65+
uses: actions/checkout@v3
66+
67+
- name: Run Gosec Security Scanner
68+
uses: securego/gosec@master
69+
with:
70+
args: ./...

0 commit comments

Comments
 (0)