Fix the NX check that looks for only affected packages when running tests in CI
This commit is contained in:
parent
a746438008
commit
0e742807de
|
@ -199,18 +199,22 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DATASOURCE: ${{ matrix.datasource }}
|
DATASOURCE: ${{ matrix.datasource }}
|
||||||
run: |
|
run: |
|
||||||
AFFECTED=$(yarn --silent nx show projects --affected -t test --base=${{ env.NX_BASE_BRANCH }} -p @budibase/server)
|
if ${{ env.ONLY_AFFECTED_TASKS }}; then
|
||||||
if [ -n "$AFFECTED" ]; then
|
AFFECTED=$(yarn --silent nx show projects --affected -t test --base=${{ env.NX_BASE_BRANCH }} -p @budibase/server)
|
||||||
cd packages/server
|
if [ -z "$AFFECTED" ]; then
|
||||||
if [ "${{ matrix.datasource }}" == "none" ]; then
|
echo "No affected tests to run"
|
||||||
yarn test --filter ./src/tests/filters/non-datasource-tests.js --passWithNoTests
|
exit 0
|
||||||
else
|
|
||||||
yarn test --filter ./src/tests/filters/datasource-tests.js --passWithNoTests
|
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "No affected tests to run"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
FILTER="./src/tests/filters/datasource-tests.js"
|
||||||
|
if [ "${{ matrix.datasource }}" == "none" ]; then
|
||||||
|
FILTER="./src/tests/filters/non-datasource-tests.js"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd packages/server
|
||||||
|
yarn test --filter $FILTER --passWithNoTests
|
||||||
|
|
||||||
check-pro-submodule:
|
check-pro-submodule:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: inputs.run_as_oss != true && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase')
|
if: inputs.run_as_oss != true && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase')
|
||||||
|
|
Loading…
Reference in New Issue