This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
Update readme to redirect people to Gutenberg #445
This file contains 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: Unit Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main*' | |
# Cancels all previous workflow runs for pull requests that have not completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name for pull requests | |
# or the commit hash for any other events. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
unit-php: | |
name: PHP | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'WordPress/block-interactivity-experiments' || github.event_name == 'pull_request' }} | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 | |
- name: Install Composer dependencies | |
run: | | |
composer install | |
- name: Use desired version of NodeJS | |
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- name: Npm install and build | |
run: | | |
npm ci | |
npm run build | |
- name: Run WordPress | |
run: | | |
npm run wp-env start | |
- name: Running single site unit tests | |
run: npm run test:unit:php | |
if: ${{ success() || failure() }} |