mirror of
https://github.com/nikoksr/notify.git
synced 2025-01-22 03:09:35 +02:00
ci(github): refactor github action for linting, testing & building
This commit is contained in:
parent
cff1e4629e
commit
30e4ab297d
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@ -1,44 +0,0 @@
|
|||||||
name: build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
notify:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2.3.4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
-
|
|
||||||
name: Set up Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: 1.15
|
|
||||||
-
|
|
||||||
name: Cache Go modules
|
|
||||||
uses: actions/cache@v2.1.5
|
|
||||||
with:
|
|
||||||
path: ~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
-
|
|
||||||
name: Make Setup
|
|
||||||
run: |
|
|
||||||
make setup
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
run: |
|
|
||||||
go build -v ./...
|
|
||||||
-
|
|
||||||
name: Make CI
|
|
||||||
run: |
|
|
||||||
make ci
|
|
22
.github/workflows/ci.yml
vendored
Normal file
22
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
jobs:
|
||||||
|
golangci:
|
||||||
|
name: Lint, Test & Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
- name: Test
|
||||||
|
run: make test
|
||||||
|
- name: Build
|
||||||
|
run: go build -v ./...
|
Loading…
x
Reference in New Issue
Block a user