From 02439ef892ec129c2d44b9d01f6f5f98b4f2cc8e Mon Sep 17 00:00:00 2001 From: Ville Aikas Date: Fri, 5 Apr 2024 13:14:01 +0300 Subject: [PATCH] Add gha for tests, dependabot. Fixes #28, #97. Signed-off-by: Ville Aikas --- .github/dependabot.yml | 13 +++++++++++++ .github/workflows/go-tests.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/go-tests.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..9173d6301 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: +- package-ecosystem: gomod + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 diff --git a/.github/workflows/go-tests.yaml b/.github/workflows/go-tests.yaml new file mode 100644 index 000000000..c6bb028eb --- /dev/null +++ b/.github/workflows/go-tests.yaml @@ -0,0 +1,32 @@ +name: Go Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + with: + egress-policy: audit + + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: '1.21' + check-latest: true + + - name: Checkout code + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - uses: chainguard-dev/actions/goimports@main + + - name: Test + run: make test