Skip to content

Commit

Permalink
👷 ci: Added a Github workflow to check the compilation and test the code
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmarquesp committed Jul 2, 2024
1 parent 74ca7c8 commit 54692d1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test Library

on:
push:
branches:
- main
- dev

permissions:
contents: read

defaults:
run:
shell: bash

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Actions Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'

- name: Install Dependencies
run: |
go get .
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Build
run: |
go build github.com/kevinmarquesp/go-postr/cmd/server
- name: Test
run: |
go test -v ./... -json 2>&1 | gotestfmt

0 comments on commit 54692d1

Please sign in to comment.