Skip to content

run api portal tests for relevant changes #1805

run api portal tests for relevant changes

run api portal tests for relevant changes #1805

Workflow file for this run

name: konfig-tests
on:
push:
branches:
- main
- 'ENG-*' # https://github.com/jitterbit/get-changed-files/issues/10#issuecomment-1012312507
pull_request:
jobs:
check_for_relevant_changes:
runs-on: ubuntu-latest
outputs:
shouldRun: ${{ steps.check_changes.outputs.shouldRun }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get changed files
id: get_changed_files
uses: Ana06/[email protected]
- name: Check for changes in specific paths
id: check_changes
run: |
for file in ${{ steps.get_changed_files.outputs.all }}; do
if [[ $file =~ ^generator/konfig-dash/ && ! $file =~ \.md$ ]]; then
echo "shouldRun=true" >> "$GITHUB_OUTPUT"
exit 0
fi
done
jobs:

Check failure on line 32 in .github/workflows/konfig-tests.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/konfig-tests.yaml

Invalid workflow file

You have an error in your yaml syntax on line 32
unit-tests:
if: needs.check_for_relevant_changes.outputs.shouldRun == 'true'
strategy:
matrix:
os: ['ubuntu-latest']
node_version: [lts/*]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
defaults:
run:
working-directory: generator/konfig-dash
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SUBMODULES_ACCESS_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: yarn
cache-dependency-path: generator/konfig-dash/yarn.lock
- run: yarn install --network-timeout 600000
- run: yarn test