Skip to content

Commit

Permalink
ci: create initial CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jsec committed Oct 22, 2024
1 parent cf63936 commit f1ba982
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
security:
name: Tests
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'

- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: -no-fail -fmt sarif -out gosec-results.sarif ./...

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: gosec-results.sarif

style:
name: Style
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: go fmt check
run: test -z $(go fmt ./...)

- name: staticcheck
run: test -z $(staticcheck ./...)

0 comments on commit f1ba982

Please sign in to comment.