Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into main
  • Loading branch information
AdamH18 committed Oct 28, 2023
2 parents 2f625a8 + 12f83c8 commit 86d2211
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit 86d2211

Please sign in to comment.