Skip to content

Commit

Permalink
run test on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haristhohir authored Jun 10, 2024
1 parent 6c70c65 commit 4e14bbd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Go

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

jobs:
test:
runs-on: ubuntu-latest

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

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.17'

- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
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 ./...

0 comments on commit 4e14bbd

Please sign in to comment.