Skip to content

Commit

Permalink
fix: can not skip e2e test (chaos-mesh#3749)
Browse files Browse the repository at this point in the history
* fix: can not skip e2e test

Signed-off-by: Yue Yang <[email protected]>

* fix: quote output

Signed-off-by: Yue Yang <[email protected]>

* fix: merge e2e_test_skip into e2e_test

Signed-off-by: Yue Yang <[email protected]>

* fix: merge skip and pass

Signed-off-by: Yue Yang <[email protected]>

* chore: update

Signed-off-by: Yue Yang <[email protected]>

* fix: revert if always()

Signed-off-by: Yue Yang <[email protected]>

Signed-off-by: Yue Yang <[email protected]>
  • Loading branch information
g1eny0ung authored Nov 6, 2022
1 parent 8b13f5a commit 9685160
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 103 deletions.
72 changes: 42 additions & 30 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
# This workflow defines the e2e test related jobs.
#
# Please note that due to the GitHub required checks, the `E2E Test Passed` job
# needs to run to report the status. So here we need to define an additional
# "skip" file to ensure that the status is reported. For details, please refer to:
#
# - `e2e_skip.yml`
# - https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: E2E Test

on:
Expand All @@ -14,30 +7,48 @@ on:
branches:
- master
- release-*
paths-ignore:
- "**.md"
# Not available for frontend code for now.
- "ui/**"
- .github/workflows/checklink.yaml
- .github/workflows/ci.yml
- .github/workflows/ci_skip.yml
- .github/workflows/codecov_unittest.yaml
- .github/workflows/integration_test.yml
- .github/workflows/license_checker.yml
- .github/workflows/manually-sign-container-images.yaml
- .github/workflows/must_update_changelog.yml
- .github/workflows/release_helm_chart.yml
- .github/workflows/stale.yml
- .github/workflows/upload_env_image.yml
- .github/workflows/upload_image.yml
- .github/workflows/upload_image_pr.yml
- .github/workflows/upload_latest_files.yml
- .github/workflows/upload_release_files.yml

permissions: read-all

jobs:
changed-files:
runs-on: ubuntu-latest
outputs:
only_changed: ${{ steps.filter.outputs.only_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changed files
uses: tj-actions/changed-files@v34
id: filter
with:
# Not available for frontend code for now.
files: |
.gitignore
**.md
ui/**
.github/workflows/checklink.yaml
.github/workflows/ci.yml
.github/workflows/ci_skip.yml
.github/workflows/codecov_unittest.yaml
.github/workflows/integration_test.yml
.github/workflows/license_checker.yml
.github/workflows/manually-sign-container-images.yaml
.github/workflows/must_update_changelog.yml
.github/workflows/release_helm_chart.yml
.github/workflows/stale.yml
.github/workflows/upload_env_image.yml
.github/workflows/upload_image.yml
.github/workflows/upload_image_pr.yml
.github/workflows/upload_latest_files.yml
.github/workflows/upload_release_files.yml
- name: Echo changed files
run: echo "${{ toJSON(steps.filter.outputs) }}"

build-image:
needs: changed-files
if: needs.changed-files.outputs.only_changed == 'false'
runs-on: ubuntu-latest
steps:
- name: checkout codes
Expand Down Expand Up @@ -102,6 +113,8 @@ jobs:
retention-days: 7

build-e2e-binary:
needs: changed-files
if: needs.changed-files.outputs.only_changed == 'false'
runs-on: ubuntu-latest
steps:
- name: checkout codes
Expand Down Expand Up @@ -224,12 +237,11 @@ jobs:
name: test-junit-reports-${{ matrix.focus }}-k8s-${{ matrix.kubernetes-version }}
path: "**/*.xml"
retention-days: 7

pass:
needs:
- e2e-test-matrix
name: E2E Test Passed
runs-on: ubuntu-latest
steps:
- run: echo "🎉 E2E Test Passed!"
needs:
- e2e-test-matrix
- build-image
- build-e2e-binary
67 changes: 0 additions & 67 deletions .github/workflows/e2e_test_skip.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/e2e_test_upload_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- master
- release-*
paths-ignore:
- .gitignore
- "**.md"
# Not available for frontend code for now.
- "ui/**"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
- .github/workflows/ci_skip.yml
- .github/workflows/codecov_unittest.yaml
- .github/workflows/e2e_test.yml
- .github/workflows/e2e_test_skip.yml
- .github/workflows/e2e_test_upload_cache.yml
- .github/workflows/license_checker.yml
- .github/workflows/manually-sign-container-images.yaml
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ core.sqlite
# But it is just tools that can be installed with make setup
/_tools/

/images/chaos-dashboard/build
node_modules
yarn.lock
/node_modules
# FIXME: comment this line temporarily to get e2e_test.yml working.
# /yarn.lock

output/
_artifacts/
Expand All @@ -44,4 +44,4 @@ e2e-test/image/e2e/manifests/
*.o

__pycache__
*.pyc
*.pyc
2 changes: 1 addition & 1 deletion ui/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js

Expand Down

0 comments on commit 9685160

Please sign in to comment.