Skip to content

Commit

Permalink
ci: 🔧 run tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashRajpurohit committed Oct 2, 2024
1 parent 4741a1f commit 8413ce3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Go

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Run tests
run: go test -v ./...
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,28 @@ permissions:
discussions: write

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Run tests
run: go test -v ./...

release:
name: Release
runs-on: ubuntu-latest
needs: [test]

steps:
- name: Checkout code
Expand All @@ -39,6 +58,7 @@ jobs:
docker_push:
name: Docker Build & Push
runs-on: ubuntu-latest
needs: [test]

steps:
- name: Checkout code
Expand Down

0 comments on commit 8413ce3

Please sign in to comment.