Skip to content

Commit

Permalink
Skip helm chart testing if the changes are docs-only changes (apache#…
Browse files Browse the repository at this point in the history
…6726)

*Motivation*

We don't need to run chart tests if the change only changes documentation
  • Loading branch information
sijie authored Apr 13, 2020
1 parent 9b77c76 commit dcb7499
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 27 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/pulsar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Install chart
run: |
.ci/chart_test.sh .ci/clusters/values-local-pv.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
14 changes: 12 additions & 2 deletions .github/workflows/pulsar_bk_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Run chart-testing (install)
run: |
.ci/chart_test.sh .ci/clusters/values-bk-tls.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
14 changes: 12 additions & 2 deletions .github/workflows/pulsar_broker_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Run chart-testing (install)
run: |
.ci/chart_test.sh .ci/clusters/values-broker-tls.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
14 changes: 12 additions & 2 deletions .github/workflows/pulsar_function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

Expand All @@ -43,4 +53,4 @@ jobs:
env:
FUNCTION: "true"
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
14 changes: 12 additions & 2 deletions .github/workflows/pulsar_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Install chart
run: |
.ci/chart_test.sh .ci/clusters/values-pulsar-image.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
14 changes: 12 additions & 2 deletions .github/workflows/pulsar_jwt_asymmetric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

Expand All @@ -43,4 +53,4 @@ jobs:
env:
SYMMETRIC: "false"
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
16 changes: 13 additions & 3 deletions .github/workflows/pulsar_jwt_symmetric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

Expand All @@ -43,4 +53,4 @@ jobs:
env:
SYMMETRIC: "true"
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
18 changes: 14 additions & 4 deletions .github/workflows/pulsar_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Run chart-testing (install)
- name: Install chart
run: |
.ci/chart_test.sh .ci/clusters/values-tls.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
18 changes: 14 additions & 4 deletions .github/workflows/pulsar_zk_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Run chart-testing (install)
- name: Install chart
run: |
.ci/chart_test.sh .ci/clusters/values-zk-tls.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'
18 changes: 14 additions & 4 deletions .github/workflows/pulsar_zkbk_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check if this pull request only changes documentation
id: docs
uses: apache/pulsar-test-infra/diff-only@master
with:
args: site2 .asf.yaml ct.yaml

- name: Run chart-testing (lint)
- name: Lint chart
id: lint
uses: helm/chart-testing-action@master
if: steps.docs.outputs.changed_only == 'no'
with:
command: lint

- name: Run chart-testing (install)
- name: Install chart
run: |
.ci/chart_test.sh .ci/clusters/values-zkbk-tls.yaml
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'
if: steps.lint.outputs.changed == 'true' && steps.docs.outputs.changed_only == 'no'

0 comments on commit dcb7499

Please sign in to comment.