Skip to content

Commit

Permalink
added test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gerceboss committed Aug 25, 2024
1 parent 5c8e261 commit 1306eeb
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run Tests on PR

on:
pull_request:
push:
branches:
- main
- dev

env:
GO_VERSION: stable
GOLANGCI_LINT_VERSION: v1.60

jobs:
test:
runs-on: ubuntu-latest

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

- name: Go set up
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod tidy

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

0 comments on commit 1306eeb

Please sign in to comment.