Skip to content

Commit

Permalink
ci: disable integration tests for release while running code-quality …
Browse files Browse the repository at this point in the history
…job (#159)

* ci: disable integration tests for release while running code-quality job

* Update .github/workflows/testing.yml

Co-authored-by: Angelo Probst <[email protected]>

* Update .github/workflows/testing.yml

Co-authored-by: Angelo Probst <[email protected]>

---------

Co-authored-by: Angelo Probst <[email protected]>
  • Loading branch information
levisingularity and angeloprobst authored Oct 30, 2024
1 parent d911357 commit be5c477
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@ name: Run Tests & Lint

on:
workflow_call:
inputs:
integration-tests:
type: boolean
default: true
required: false
description: Define if should run the integration test, sometimes you need to disable it if you running a release and need to create the version and update server before you attempt to run the integration test.

pull_request:
branches:
- master

workflow_dispatch:
inputs:
integration-tests:
type: boolean
default: true
required: false
description: Define if should run the integration test, sometimes you need to disable it if you running a release and need to create the version and update server before you attempt to run the integration test.

jobs:
lint:
Expand Down Expand Up @@ -82,7 +94,7 @@ jobs:
run: make unit-tests-coverage

build-and-integration-test:
if: ${{ github.ref_name != 'master' }}
if: ${{ inputs.integration-tests && github.ref_name != 'master' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand All @@ -104,7 +116,7 @@ jobs:
run: make integration-tests

integration-test-with-latest-image:
if: ${{ github.ref_name == 'master' }}
if: ${{ inputs.integration-tests && github.ref_name == 'master' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand Down Expand Up @@ -142,7 +154,7 @@ jobs:
EOF
das-cli config list
- name: Start das-cli database
run: das-cli db start

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/vultr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
jobs:
code-quality:
uses: ./.github/workflows/testing.yml
with:
integration-tests: false
secrets: inherit

tag:
Expand Down

0 comments on commit be5c477

Please sign in to comment.