Skip to content

Commit

Permalink
ci: replace docker-compose commands with docker compose (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine authored Aug 6, 2024
1 parent 2b947dc commit 205da8c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-baboons-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wpengine/wp-graphql-content-blocks": patch
---

ci: replace `docker-compose` commands with `docker compose`
18 changes: 9 additions & 9 deletions .github/workflows/test-plugin-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
WP_VERSION: 6.5
working-directory: ./
run: |
docker-compose build \
docker compose build \
--build-arg WP_VERSION=6.5 \
--build-arg PHP_VERSION=8.2
docker-compose up -d
docker compose up -d
- name: Wait for db
run: |
Expand All @@ -32,22 +32,22 @@ 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

- name: Ensure Correct WordPress version
run: |
docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) wp core version --allow-root
docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) wp core upgrade --version=nightly --force --allow-root
docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) wp core version --allow-root
docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) wp core version --allow-root
docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) wp core upgrade --version=nightly --force --allow-root
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: ./
run: docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) wp plugin install wp-graphql --activate --allow-root
run: docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) wp plugin install wp-graphql --activate --allow-root

- name: Install Dependencies
working-directory: ./
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) composer install
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) composer install

- name: Run unit tests
working-directory: ./
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) composer test
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) composer test
12 changes: 6 additions & 6 deletions .github/workflows/test-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
WP_VERSION: ${{ matrix.wordpress }}
working-directory: ./
run: |
docker-compose build \
docker compose build \
--build-arg WP_VERSION=${{ matrix.wordpress }} \
--build-arg PHP_VERSION=${{ matrix.php }}
docker-compose up -d
docker compose up -d
- name: Wait for db
run: |
Expand All @@ -49,16 +49,16 @@ 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

- name: Install and activate WP GraphQL
working-directory: ./
run: docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) wp plugin install wp-graphql --activate --allow-root
run: docker exec --workdir=/var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) wp plugin install wp-graphql --activate --allow-root

- name: Install Dependencies
working-directory: ./
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) composer install
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) composer install

- name: Run unit tests
working-directory: ./
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker-compose ps -q wordpress) composer test
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/wp-graphql-content-blocks $(docker compose ps -q wordpress) composer test

0 comments on commit 205da8c

Please sign in to comment.