From 457da150204ec3dc067f0b4378633a2a9b73ad0c Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Thu, 21 Mar 2024 07:30:04 -0400 Subject: [PATCH 1/2] Add basic CI No tests yet, but this'll build a test binary anyway as a sanity check. --- .github/dependabot.yml | 4 ++++ .github/workflows/ci.yml | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f1b219b..c507d44 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,7 @@ updates: directory: "/" schedule: interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d330051 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,9 @@ +name: ci +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + - run: go test ./... From e7f2b2aaa9a95f48151b00c2e4956e2094ef8151 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Thu, 21 Mar 2024 07:35:39 -0400 Subject: [PATCH 2/2] Change `on` We don't need to run this workflow twice for a PR, since it's matching both `push` and `pull_request`. Try this trimmed down `on` from connect-go. Ref: https://github.com/connectrpc/connect-go/blob/main/.github/workflows/ci.yaml#L3-L7 --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d330051..321df22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: ci -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + branches: [main] jobs: test: runs-on: ubuntu-latest