test path filtering [do not review - testing] #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."} |