Skip to content

Commit

Permalink
ci: testing github actions for status checks (#112)
Browse files Browse the repository at this point in the history
Co-authored-by: Luca Lanziani <[email protected]>
  • Loading branch information
LucaLanziani and LucaLanziani authored Mar 20, 2023
1 parent fed2947 commit 1a3e667
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- submitted

jobs:
create-cluster:
integration-tests:
if: github.event.review.state == 'approved' && !startsWith(github.event.pull_request.title, 'docs:')
strategy:
matrix:
Expand All @@ -19,7 +19,8 @@ jobs:
labels: ubuntu-latest-4-cores
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Integration test
run: |
Expand All @@ -40,3 +41,18 @@ jobs:
KKA_AOA_EXCLUDE_PROMETHEUSSTACK: true
KKA_AOA_EXCLUDE_OPENTELEMETRY: true
KKA_K8S_VERSION: ${{ matrix.KKA_K8S_VERSION }}

# https://github.com/orgs/community/discussions/26822#discussioncomment-5122101
integration-tests-result:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
name: Integration Tests
needs: [integration-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- submitted

jobs:
create-cluster:
unit-tests:
if: github.event.review.state == 'approved' && !startsWith(github.event.pull_request.title, 'docs:')
strategy:
matrix:
Expand All @@ -18,7 +18,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Unit test
run: |
Expand All @@ -37,3 +38,18 @@ jobs:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KKA_DEPLOY_MINIMAL: true
KKA_K8S_VERSION: ${{ matrix.KKA_K8S_VERSION }}

# https://github.com/orgs/community/discussions/26822#discussioncomment-5122101
unit-tests-result:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
name: Unit Tests
needs: [unit-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}

0 comments on commit 1a3e667

Please sign in to comment.