Skip to content

Commit

Permalink
test: add xtrace for github action shells
Browse files Browse the repository at this point in the history
For all Rook-maintained GH actions, use a default shell that has xtrace
enabled to help debug any errors.

Enable xtrace on all actions except these that use only external tools:
- codespell
- commitlint (wagoid/commitlint)
- golangci-lint
- helm-lint (chart-testing)
- stale
- yamllint

Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed Jun 22, 2021
1 parent 5e7d9ba commit e71882f
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Builds
on:
pull_request:

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
macos-build:
runs-on: macos-10.15
Expand Down Expand Up @@ -69,4 +74,4 @@ jobs:

- name: setup tmate session for debugging
if: failure()
uses: mxschmitt/action-tmate@v3
uses: mxschmitt/action-tmate@v3
5 changes: 5 additions & 0 deletions .github/workflows/canary-integration-test-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
schedule:
- cron: '0 0 * * *' # every day at midnight

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
canary-arm64:
runs-on: [self-hosted, ubuntu-20.04, ARM64]
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/canary-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
canary:
runs-on: ubuntu-18.04
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
codegen:
runs-on: ubuntu-18.04
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/crds-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
crds-gen:
runs-on: ubuntu-18.04
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/integration-test-cassandra-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
branches:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCassandraSuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && contains(github.event.pull_request.labels.*.name, 'cassandra')}}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration-test-flex-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephFlexSuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration-test-helm-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephHelmSuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration-test-mgr-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Integration test CephMgrSuite
on:
pull_request:

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephMgrSuite:
runs-on: ubuntu-18.04
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration-test-multi-cluster-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephMultiClusterDeploySuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/integration-test-nfs-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
branches:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestNfsSuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && contains(github.event.pull_request.labels.*.name, 'nfs')}}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration-test-smoke-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephSmokeSuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integration-test-upgrade-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephUpgradeSuite:
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/integration-tests-on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
TestCephFlexSuite:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/tags/release-*'
Expand Down Expand Up @@ -358,4 +363,3 @@ jobs:
- name: setup tmate session for debugging
if: failure()
uses: mxschmitt/action-tmate@v3

5 changes: 5 additions & 0 deletions .github/workflows/mod-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
modcheck:
runs-on: ubuntu-18.04
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/push-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ on:
push:
branches:
- master

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
push-image-to-container-registry:
runs-on: ubuntu-18.04
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- master
- release-*

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
unittests:
runs-on: ubuntu-18.04
Expand All @@ -28,4 +33,3 @@ jobs:
- name: run unit tests
working-directory: /home/runner/go/src/github.com/rook/rook
run: GOPATH=$(go env GOPATH) make -j $(nproc) test

0 comments on commit e71882f

Please sign in to comment.