diff --git a/.github/workflows/pr.yaml b/.github/workflows/build.yaml similarity index 100% rename from .github/workflows/pr.yaml rename to .github/workflows/build.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..bae1d6e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,30 @@ +name: "Unit Test" + +on: + push: + branches: + - main + - staging + pull_request: + branches: + - main + - staging + +jobs: + build: + name: Run Go Unit Tests + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.20 + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Get dependencies + run: go mod download + + - name: Run tests + run: go test -v ./... \ No newline at end of file