From c437aeb9bf1954112670cb7a3d4ac1c1ceb9065b Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Thu, 17 Oct 2024 12:43:48 +0300 Subject: [PATCH] Add test CI job Signed-off-by: Juan Antonio Osorio --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f0eea7b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +--- +name: Test + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 + + - name: Set up Go + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5 + with: + check-latest: true + + - name: setup task + uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + # Install gotestfmt on the VM running the action. + - name: Set up gotestfmt + uses: GoTestTools/gotestfmt-action@8b4478c7019be847373babde9300210e7de34bfb # v2.2.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Run go mod download + run: go mod download + + - name: build + run: |- + task test