Skip to content

Fix for multidaycutoff and all day event updates #5490

Fix for multidaycutoff and all day event updates

Fix for multidaycutoff and all day event updates #5490

Workflow file for this run

name: 'Codeception Tests'
on: [ pull_request ]
jobs:
test:
strategy:
matrix:
suite:
- aggregatorv1
- blocks_editor_integration
- event_status
- integration
- integrations_plugin_wordpress_seo
- muintegration
- restv1
- views_integration
- views_settings
- views_ui
- views_v2_customizer_integration
- views_widgets
- views_wpunit
- wpunit
- ct1_integration
- ct1_multisite_integration
- deprecated
# really weird error with RBE changes.
# - views_rest
- wp_json_api
- ct1_wp_json_api
- rewrite_functional
runs-on: ubuntu-20.04
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 1000
submodules: recursive
# ------------------------------------------------------------------------------
# Set up PHP to run slic
# ------------------------------------------------------------------------------
- name: Configure PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
# ------------------------------------------------------------------------------
# Check if any PHP files have changed
# ------------------------------------------------------------------------------
- name: Check changed files
id: skip
run: |
num_php_files=$(git diff ${{ github.event.pull_request.base.sha }} HEAD --name-only | grep -P "\.php" | wc -l)
if [[ -z "$num_php_files" ]]; then
echo "::set-output name=value::1"
elif [[ "$num_php_files" == "0" || "$num_php_files" == "" ]]; then
echo "::set-output name=value::1"
else
echo "::set-output name=value::0"
fi
# ------------------------------------------------------------------------------
# Checkout slic
# ------------------------------------------------------------------------------
- name: Checkout slic
uses: actions/checkout@v2
if: steps.skip.outputs.value != 1
with:
repository: stellarwp/slic
ref: main
path: slic
fetch-depth: 1
# ------------------------------------------------------------------------------
# Prepare our composer cache directory
# ------------------------------------------------------------------------------
- name: Get Composer Cache Directory
id: get-composer-cache-dir
if: steps.skip.outputs.value != 1
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
id: composer-cache
if: steps.skip.outputs.value != 1
with:
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
# ------------------------------------------------------------------------------
# Initialize slic
# ------------------------------------------------------------------------------
- name: Set up slic env vars
if: steps.skip.outputs.value != 1
run: |
echo "SLIC_BIN=${GITHUB_WORKSPACE}/slic/slic" >> $GITHUB_ENV
echo "SLIC_WP_DIR=${GITHUB_WORKSPACE}/slic/_wordpress" >> $GITHUB_ENV
echo "SLIC_WORDPRESS_DOCKERFILE=Dockerfile.base" >> $GITHUB_ENV
- name: Set run context for slic
if: steps.skip.outputs.value != 1
run: echo "SLIC=1" >> $GITHUB_ENV && echo "CI=1" >> $GITHUB_ENV
- name: Start ssh-agent
if: steps.skip.outputs.value != 1
run: |
mkdir -p "${HOME}/.ssh";
ssh-agent -a /tmp/ssh_agent.sock;
- name: Export SSH_AUTH_SOCK env var
if: steps.skip.outputs.value != 1
run: echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV
- name: Set up slic for CI
if: steps.skip.outputs.value != 1
run: |
cd ${GITHUB_WORKSPACE}/..
${SLIC_BIN} here
${SLIC_BIN} interactive off
${SLIC_BIN} build-prompt off
${SLIC_BIN} build-subdir off
${SLIC_BIN} xdebug off
${SLIC_BIN} debug on
${SLIC_BIN} info
${SLIC_BIN} config
- name: Start the Chrome container
if: steps.skip.outputs.value != 1
run: ${SLIC_BIN} up chrome
- name: Set up Common
if: steps.skip.outputs.value != 1
run: |
docker network prune -f
${SLIC_BIN} use the-events-calendar/common
${SLIC_BIN} composer install --no-dev
- name: Set up The Events Calendar
if: steps.skip.outputs.value != 1
run: |
${SLIC_BIN} use the-events-calendar
${SLIC_BIN} composer install
- name: Init the WordPress container
if: steps.skip.outputs.value != 1
run: ${SLIC_BIN} up wordpress
- name: Ensure Twenty-Twenty is installed
if: steps.skip.outputs.value != 1
run: |
${SLIC_BIN} wp theme install twentytwenty --activate
# ------------------------------------------------------------------------------
# Try to install the external plugins
# ------------------------------------------------------------------------------
- name: Read which external plugins should be loaded.
id: yml-test-suite-data
if: steps.skip.outputs.value != 1
uses: jbutcher5/read-yaml@main
with:
file: tests/${{ matrix.suite }}.suite.dist.yml
key-path: '[ "external_plugins" ]'
- name: Prepare variable for
if: steps.skip.outputs.value != 1 && steps.yml-test-suite-data.outputs.data
id: test_suite_plugins_required
run: |
TEST_SUITE_DATA="${{ steps.yml-test-suite-data.outputs.data }}"
TEST_SUITE_DATA=$(echo ${TEST_SUITE_DATA} | sed "s|,||g" | sed "s|\[| |g" | sed "s|\]||g")
echo "::set-output name=content::$TEST_SUITE_DATA"
- name: Install the plugins on this particular Test Suite
if: steps.skip.outputs.value != 1 && steps.test_suite_plugins_required.outputs.content
run: |
${SLIC_BIN} wp core update --version=6.1
${SLIC_BIN} wp plugin install ${{ steps.test_suite_plugins_required.outputs.content }}
# ------------------------------------------------------------------------------
# Run the Actual tests
# ------------------------------------------------------------------------------
- name: Run suite tests
if: steps.skip.outputs.value != 1
run: ${SLIC_BIN} run ${{ matrix.suite }} --ext DotReporter