Skip to content

Commit

Permalink
Workflows Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mohit-nagaraj committed Oct 19, 2024
1 parent 65a853d commit 5438cb4
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
name: Build Project
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

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

- name: Build Project
run: go build ./...
28 changes: 28 additions & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Dependency Check

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
dependency_check:
name: Check for Dependency Vulnerabilities
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

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

- name: Check and Tidy Dependencies
run: |
go get -u -v
go mod tidy
3 changes: 3 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
test:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

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

- name: Install golangci-lint
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: Run golangci-lint
run: golangci-lint run
29 changes: 29 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Static Analysis

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
static_analysis:
name: Static Code Analysis
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- 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: Run staticcheck
run: staticcheck ./...

0 comments on commit 5438cb4

Please sign in to comment.