🔥 Trigger dev container workflow #173
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Copy .env file | |
working-directory: .devcontainer | |
run: cp config/app/.env.example .env | |
- name: Start dev container and test | |
uses: devcontainers/ci@v0.3 | |
with: | |
configFile: .devcontainer/devcontainer.json | |
cacheFrom: ghcr.io/roots/acorn-devcontainer:${{ github.ref_name }} | |
push: never | |
runCmd: | | |
# Wait for database to be ready | |
while ! mysqladmin ping -h"database" --silent; do | |
sleep 1 | |
done | |
# Ensure WordPress is installed | |
cd /roots/app | |
wp core install --url=http://web:8080 --title="Acorn Testing" --admin_user=admin --admin_password=password --admin_email=admin@roots.test --skip-email --allow-root | |
# Ensure Sage theme is activated | |
wp theme activate sage | |
# Clear optimization cache | |
wp acorn optimize:clear | |
# Run the routing integration tests | |
cd /roots/acorn | |
composer install | |
composer run-script test tests/Integration/Routing | |
- name: Verify site is running | |
run: | | |
curl -I http://localhost:8080 | grep "200 OK" |