From 40e9ccc61c766cd785637214101b1ebf127371c7 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Thu, 11 Jul 2024 20:37:10 -0400 Subject: [PATCH] ci: run sast+tests --- .forgejo/workflows/push.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .forgejo/workflows/push.yml diff --git a/.forgejo/workflows/push.yml b/.forgejo/workflows/push.yml new file mode 100644 index 0000000..48c6f95 --- /dev/null +++ b/.forgejo/workflows/push.yml @@ -0,0 +1,24 @@ +on: + push: + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: './go.mod' + - name: Install dependencies + run: go mod tidy + - name: Run tests + run: go test -v + sast: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: './go.mod' + - name: Check formatting + run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi