Skip to content

Commit b154238

Browse files
committed
build: add action workflows
1 parent 58ed3ff commit b154238

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @adhocore

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: adhocore
2+
custom: ['https://paypal.me/ji10']

.github/workflows/codeql-analysis.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "CodeQL"
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
schedule:
8+
- cron: '20 15 * * 6'
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language: [ 'go' ]
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v1
26+
with:
27+
languages: ${{ matrix.language }}
28+
- name: Autobuild
29+
uses: github/codeql-action/autobuild@v1
30+
- name: Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v1

.github/workflows/lint-action.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Lint
2+
on: [push]
3+
jobs:
4+
golint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout code
8+
uses: actions/checkout@v2
9+
- name: Lint
10+
id: golint
11+
uses: Jerome1337/go-action/lint@master
12+
- name: Lint Output
13+
run: echo "${{ steps.golint.outputs.golint-output }}"

.github/workflows/test-action.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x]
8+
os: [ubuntu-latest]
9+
runs-on: ${{ matrix.os }}
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Install Go
14+
uses: actions/setup-go@v2
15+
with:
16+
go-version: ${{ matrix.go-version }}
17+
- name: Test
18+
run: go test -cover -coverprofile=coverage.txt -covermode=atomic ./...
19+
- name: Cov
20+
run: bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)