From 8cb184a60bcced14821b84fad7ae2507a4abe85b Mon Sep 17 00:00:00 2001 From: Chris Tran Date: Thu, 17 Oct 2024 18:38:50 -0500 Subject: [PATCH] ci: adds race detector test to ci and replaces redundant test steps with a workflow call --- .github/workflows/deploy.yml | 14 +++----------- .github/workflows/on-pull-request.yml | 6 +++++- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c135294..bc4e803 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,21 +13,13 @@ env: PASSAGE_AUTH_TOKEN: ${{ secrets.PASSAGE_AUTH_TOKEN }} jobs: + run-test-workflow: + uses: ./.github/workflows/on-pull-request.yml + build: name: Create Release runs-on: ubuntu-latest steps: - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: '1.20.14' - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Test - run: go test ./... - - name: Checkout code uses: actions/checkout@v2 with: diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 296dfa1..8c13888 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -1,6 +1,7 @@ name: Run Tests -on: +on: + workflow_call: workflow_dispatch: pull_request: @@ -26,3 +27,6 @@ jobs: - name: Test run: go test ./... + + - name: Test with race detector + run: go test -race -run TestAppJWKSCacheWriteConcurrency