Start wp-env in the background while we're building the blocks #1001
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: CI | |
| on: | |
| push: | |
| branches: [ trunk, try/phpunit-tests ] | |
| pull_request: | |
| branches: [ trunk ] | |
| workflow_dispatch: | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 | |
| - name: Install NodeJS | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: yarn | |
| - name: Install dependencies & setup configs | |
| run: | | |
| yarn setup:tools | |
| - name: Install dependencies | |
| run: | | |
| yarn | |
| composer install | |
| yarn build | |
| yarn wp-env start | |
| - name: Run PHP unit tests | |
| run: | | |
| yarn test:php |