Skip to content

Commit

Permalink
[ADD] GitHub Actions config
Browse files Browse the repository at this point in the history
  • Loading branch information
stivenramireza committed Mar 15, 2024
1 parent 755ce35 commit 25d9c5c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/validate-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test workflow

on:
push:
branches:
- "*"

jobs:
code-validation:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "^1.18"

- name: Install dependencies
working-directory: ./github-tracker
run: go mod vendor

- name: Check unit test
working-directory: ./github-tracker
run: go test ./...
continue-on-error: false
15 changes: 15 additions & 0 deletions github-tracker/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"testing"

"github.com/stretchr/testify/require"
)

func TestDummy(t *testing.T) {
c := require.New(t)

result := 22

c.Equal(22, result)
}

0 comments on commit 25d9c5c

Please sign in to comment.