From 9687b8b14cb3308a4df8a69238a5a40af52cffac Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Mon, 13 Jan 2025 16:42:40 -0800 Subject: [PATCH] CI and CODEOWNERS update (#85) * simplify ci to ease maintenance * add a product eng team as a codeowner --- .github/workflows/test-and-build.yml | 17 ++++++++--------- CODEOWNERS | 4 ++-- Makefile | 3 --- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml index 2078eb1..0b070ef 100644 --- a/.github/workflows/test-and-build.yml +++ b/.github/workflows/test-and-build.yml @@ -1,15 +1,18 @@ name: Test and Build on: + pull_request: + branches: ["main"] push: + branches: ["main"] + tags: ["*"] permissions: contents: read - jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 @@ -27,7 +30,7 @@ jobs: run: go vet ./... test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: go-version: @@ -41,13 +44,9 @@ jobs: - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ matrix.go-version }} + cache: true - uses: autero1/action-gotestsum@7263b9d73912eec65f46337689e59fac865c425f # v2.0.0 with: gotestsum_version: 1.9.0 - - run: mkdir -p "$TEST_RESULTS" - - run: make test-ci - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - path: ${{ env.TEST_RESULTS }} - name: tests-linux + - run: make test diff --git a/CODEOWNERS b/CODEOWNERS index 3da71e0..f52ee4f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,7 +2,7 @@ # More on CODEOWNERS files: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners # Default owner -* @hashicorp/team-ip-compliance +* @hashicorp/team-ip-compliance @hashicorp/nomad-eng # Add override rules below. Each line is a file/folder pattern followed by one or more owners. # Being an owner means those groups or individuals will be added as reviewers to PRs affecting @@ -10,4 +10,4 @@ # Examples: # /docs/ @docs-team # *.js @js-team -# *.go @go-team \ No newline at end of file +# *.go @go-team diff --git a/Makefile b/Makefile index 21c4f13..566192e 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,6 @@ generate: test: @go test $(TEST_VERBOSE_ARG) $(GOTEST_PKGS) -test-ci: - @gotestsum --junitfile $(TEST_RESULTS)/gotestsum-report.xml -- $(GOTEST_PKGS) - bench: @go test $(TEST_VERBOSE_ARG) -run DONTRUNTESTS -bench $(BENCHTESTS) $(BENCHFULL_ARG) -benchtime=$(BENCHTIME) $(GOTEST_PKGS)