Skip to content

Commit

Permalink
chore(ci): Test code before running bootstrap workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden Roszell <[email protected]>
  • Loading branch information
m8rmclaren committed Dec 24, 2024
1 parent 6047d93 commit c5c4544
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 42 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/keyfactor-bootstrap-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,44 @@ on:
- 'release-*.*'

jobs:

build:
name: Build and Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
cache: true
- run: go mod download
- run: go build -v .
- name: Run linters
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
with:
version: latest

test:
name: Go Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Set up Go 1.x
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
cache: true
- run: go mod download
- name: Run go test
run: go test -v ./...

call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@v3
needs: test
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit c5c4544

Please sign in to comment.