diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml new file mode 100644 index 00000000..1c069025 --- /dev/null +++ b/.github/workflows/unit-test.yaml @@ -0,0 +1,33 @@ +name: Unit Tests +on: + pull_request: + paths-ignore: + - 'vendor/*' + branches: + - main + - release-* + +# cancel the in-progress workflow when PR is refreshed. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + unittests: + name: unittests + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: setup go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - name: run unit tests + run: make test