Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test path filtering [do not review - testing] #7039

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
env:
DE_IMAGE: 'ghcr.io/radius-project/deployment-engine'
DE_TAG: 'latest'
FUNCTIONAL_TEST_APP_ID: 425843
FUNCTIONAL_TEST_APP_ID: 428394
outputs:
REL_VERSION: ${{ steps.gen-id.outputs.REL_VERSION }}
UNIQUE_ID: ${{ steps.gen-id.outputs.UNIQUE_ID }}
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
BICEP_RECIPE_TAG_VERSION: ${{ needs.build.outputs.REL_VERSION }}
DE_IMAGE: ${{ needs.build.outputs.DE_IMAGE }}
DE_TAG: ${{ needs.build.outputs.DE_TAG }}
FUNCTIONAL_TEST_APP_ID: 425843
FUNCTIONAL_TEST_APP_ID: 428394
steps:
- name: Login as the GitHub App
uses: tibdex/github-app-token@v1
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/functional-tests-approval.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: 'Approve Functional Tests'
on:
pull_request:
paths-ignore:
- 'versions.yaml'
branches:
- main
- features/*
- release/*

jobs:
approve-functional-tests-run:
name: 'Approve Functional Tests'
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/functional-tests-no-approval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Skip Functional Tests'
on:
pull_request:
branches:
- main
- features/*
- release/*

jobs:
skip-functional-tests:
name: Skip functional tests
runs-on: ubuntu-latest
env:
FUNCTIONAL_TEST_APP_ID: 428394
steps:
- name: Check if only versions.yaml has changed
id: check_file_changes
run: |
if [[ $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) == *"versions.yaml"* && $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | wc -l) -eq 1 ]]; then
echo "::set-output name=only_versions_yaml::true"
else
echo "::set-output name=only_versions_yaml::false"
fi
- name: Login as the GitHub App
uses: tibdex/github-app-token@v1
id: get_installation_token
with:
app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }}
private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }}
- uses: LouisBrunner/[email protected]
if: ${{ steps.check_file_changes.outputs.only_versions_yaml == 'true' }}
with:
token: ${{ steps.get_installation_token.outputs.token }}
name: 'Functional Test Run'
repo: ${{ github.repository }}
sha: ${{ env.CHECKOUT_REF }}
status: completed
conclusion: ${{ job.status }}
output: |
{"summary":"Functional Test run not required as only versions.yaml has changed."}
Loading