Skip to content
Closed
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
30 changes: 21 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ jobs:
- name: Collect additional information
id: info
run: |
# Allows overriding full suite
force_integration_changes="[]"

# Defaults
integrations_glob=""
mariadb_groups=${MARIADB_VERSIONS}
Expand All @@ -144,14 +147,21 @@ jobs:
tests_glob=""
skip_coverage=""

if [[ "${{ steps.integrations.outputs.changes }}" != "[]" ]];
# Check if we have changes in integrations
integration_changes=${{ steps.integrations.outputs.changes }}
if [[ "${force_integration_changes}" != "[]" ]];
then
integration_changes="${force_integration_changes}"
fi

if [[ "${integration_changes}" != "[]" ]];
then
# Create a file glob for the integrations
integrations_glob=$(echo '${{ steps.integrations.outputs.changes }}' | jq -cSr '. | join(",")')
integrations_glob=$(echo "${integration_changes}" | jq -cSr '. | join(",")')
[[ "${integrations_glob}" == *","* ]] && integrations_glob="{${integrations_glob}}"

# Create list of testable integrations
possible_integrations=$(echo '${{ steps.integrations.outputs.changes }}' | jq -cSr '.[]')
possible_integrations=$(echo "${integration_changes}" | jq -cSr '.[]')
tests=$(
for integration in ${possible_integrations};
do
Expand All @@ -178,12 +188,14 @@ jobs:

# We need to run the full suite on certain branches.
# Or, in case core files are touched, for the full suite as well.
if [[ "${{ github.ref }}" == "refs/heads/dev" ]] \
|| [[ "${{ github.ref }}" == "refs/heads/master" ]] \
|| [[ "${{ github.ref }}" == "refs/heads/rc" ]] \
|| [[ "${{ steps.core.outputs.any }}" == "true" ]] \
|| [[ "${{ github.event.inputs.full }}" == "true" ]] \
|| [[ "${{ contains(github.event.pull_request.labels.*.name, 'ci-full-run') }}" == "true" ]];
if [[ "${force_integration_changes}" == "[]" ]] \
&& ([[ "${{ github.ref }}" == "refs/heads/dev" ]] \
|| [[ "${{ github.ref }}" == "refs/heads/master" ]] \
|| [[ "${{ github.ref }}" == "refs/heads/rc" ]] \
|| [[ "${{ steps.core.outputs.any }}" == "true" ]] \
|| [[ "${{ github.event.inputs.full }}" == "true" ]] \
|| [[ "${{ contains(github.event.pull_request.labels.*.name, 'ci-full-run') }}" == "true" ]]
);
then
mariadb_groups=${MARIADB_VERSIONS}
postgresql_groups=${POSTGRESQL_VERSIONS}
Expand Down
Loading