-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/AdamH18/Scanlation-Discord-Bot
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.21' | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: 'v1.54' | ||
args: --timeout=30m | ||
continue-on-error: true | ||
|
||
security-check: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
- name: Run Gosec Security Scanner | ||
uses: securego/gosec@master | ||
with: | ||
args: ./... | ||
continue-on-error: true | ||
|
||
build: | ||
needs: security-check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
sudo apt-get update | ||
sudo apt-get install -y git gcc musl-dev libsqlite3-dev | ||
go mod download | ||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o scanlation-discord-bot . | ||
- name: Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: scanlation-discord-bot | ||
path: scanlation-discord-bot |