diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..da00940 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,36 @@ +name: run tests + +on: + pull_request: + branches: [ "*" ] + +permissions: + id-token: write + +jobs: + + testGo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Golang caches + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-golang- + + - name: Setup Golang + uses: actions/setup-go@v5 + with: + go-version-file: './go.mod' + + - name: run go tests + env: + RUN_INTEGRATION_TESTS: true + run: | + go test -v ./...