Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "latest" to testing matrix #234

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG WP_VERSION
ARG PHP_VERSION

FROM wordpress:${WP_VERSION}-php${PHP_VERSION}
FROM wordpress:latest

# Save the build args for use by the runtime environment
ENV WP_VERSION=${WP_VERSION}
Expand All @@ -17,6 +17,10 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
&& mv wp-cli.phar /usr/local/bin/wp \
&& wp --info

RUN wp core update --version=${WP_VERSION} --force \
&& wp core update-db --force \
&& wp core version

RUN set -e \
; apt-get -qq update \
; apt-get install \
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
php: [ '8.2', '7.4' ]
wordpress: [ '6.5', '6.4', '6.3', '6.2', '6.1' ]
wordpress: [ 'latest', '6.5', '6.4', '6.3', '6.2', '6.1' ]
exclude:
- php: 8.2
wordpress: 6.1
Expand All @@ -24,6 +24,8 @@ jobs:
wordpress: 6.4
- php: 7.4
wordpress: 6.5
- php: 7.4
wordpress: 'latest'
fail-fast: false
name: WordPress ${{ matrix.wordpress }}, PHP ${{ matrix.php }}
steps:
Expand All @@ -49,7 +51,9 @@ jobs:

- name: Setup testing framework
working-directory: ./
run: docker exec -e COVERAGE=1 $(docker-compose ps -q wordpress) init-testing-environment.sh
run: |
docker exec -e COVERAGE=1 $(docker-compose ps -q wordpress) init-testing-environment.sh
docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) wp core version --allow-root

- name: Install and activate WP GraphQL
working-directory: ./
Expand Down
4 changes: 2 additions & 2 deletions bin/_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ download() {
}

install_wordpress() {

if [ -d $WP_CORE_DIR ]; then
return;
fi
Expand Down Expand Up @@ -113,7 +113,7 @@ configure_wordpress() {

echo "Setting up WordPress..."
export WP_CLI_CONFIG_PATH=${WP_CLI_CONFIG_PATH};

wp config create --dbname="$DB_NAME" --dbuser="$DB_USER" --dbpass="$DB_PASS" --dbhost="$DB_HOST" --skip-check --force=true
wp core install --url=$WP_DOMAIN --title=Test --admin_user=$ADMIN_USERNAME --admin_password=$ADMIN_PASSWORD --admin_email=$ADMIN_EMAIL
wp rewrite structure '/%year%/%monthnum%/%postname%/' --hard
Expand Down
Loading