Skip to content

Modernize Testing Infrastructure and Theme Structure #8

Modernize Testing Infrastructure and Theme Structure

Modernize Testing Infrastructure and Theme Structure #8

Workflow file for this run

name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: docker compose up --build --abort-on-container-exit --exit-code-from wordpress-test
- name: Add coverage to job summary
run: |
echo "# PHP Test Coverage" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
cat coverage.txt >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY