From c38276b82e7cb06128e55871468c5dc2b9718c33 Mon Sep 17 00:00:00 2001 From: faiq Date: Tue, 23 Sep 2025 09:21:55 -0700 Subject: [PATCH] ci: adds unit tests --- .github/workflows/unit-test.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000000..916b52cb96 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,26 @@ +name: PR run unit and integration tests + +on: + pull_request_target: + types: + - edited + - labeled + - reopened + - synchronize + +jobs: + approve: + name: runs unit and integration tests + if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # tag=v4.2.2 + - name: Calculate go version + id: vars + run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # tag=v6.0.0 + with: + go-version: ${{ steps.vars.outputs.go_version }} + - name: Run runs-test + run: make test