Skip to content

Commit

Permalink
ci-tests are now a requirement of the release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Nov 17, 2023
1 parent 68e17d5 commit 5018a1f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/builders.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# builders.yml
name: Build Binary and Images
on:
workflow_call:
Expand All @@ -7,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI tests
on:
workflow_call:
pull_request_target:
branches:
- master
- main

jobs:
lint:
uses: ./.github/workflows/linters.yml

build:
uses: ./.github/workflows/builders.yml
needs: lint

tests:
needs: build
uses: ./.github/workflows/test-k8s.yml
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# pullrequest.yml
name: Pull Request Workflow
name: Linters
on:
push:
branches:
- master
pull_request_target:
branches:
- master
- main

workflow_call:
jobs:
linters:
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -26,11 +18,3 @@ jobs:

- name: Run pre-commit hooks
run: pre-commit run --all-files

build:
uses: ./.github/workflows/builders.yml
needs: linters
tests:
needs: build
uses: ./.github/workflows/test-k8s.yml
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,27 @@ on:
tags:
- "*" # triggers only if push new tag version
jobs:
lint:
uses: ./.github/workflows/linters.yml

build:
uses: ./.github/workflows/builders.yml
needs: lint

ci-tests:
needs: build
uses: ./.github/workflows/ci-tests.yml
secrets: inherit

release-build:
uses: ./.github/workflows/gorelease.yml
needs: ci-tests

image-upload:
uses: ./.github/workflows/image-upload.yml
needs: ci-tests
secrets: inherit

deploy-docs:
uses: ./.github/workflows/docs.yml
needs: ci-tests

0 comments on commit 5018a1f

Please sign in to comment.