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,17 +199,21 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DATASOURCE: ${{ matrix.datasource }}
|
DATASOURCE: ${{ matrix.datasource }}
|
||||||
run: |
|
run: |
|
||||||
|
if ${{ env.ONLY_AFFECTED_TASKS }}; then
|
||||||
AFFECTED=$(yarn --silent nx show projects --affected -t test --base=${{ env.NX_BASE_BRANCH }} -p @budibase/server)
|
AFFECTED=$(yarn --silent nx show projects --affected -t test --base=${{ env.NX_BASE_BRANCH }} -p @budibase/server)
|
||||||
if [ -n "$AFFECTED" ]; then
|
if [ -z "$AFFECTED" ]; then
|
||||||
cd packages/server
|
|
||||||
if [ "${{ matrix.datasource }}" == "none" ]; then
|
|
||||||
yarn test --filter ./src/tests/filters/non-datasource-tests.js --passWithNoTests
|
|
||||||
else
|
|
||||||
yarn test --filter ./src/tests/filters/datasource-tests.js --passWithNoTests
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "No affected tests to run"
|
echo "No affected tests to run"
|
||||||
|
exit 0
|
||||||
fi
|
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
|
||||||
|
|
Loading…
Reference in New Issue