chore: update CI/CD workflow #66
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: TrashPostInBlockEditor CI | |
| on: | |
| push: | |
| permissions: | |
| contents: write | |
| jobs: | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js 20.x | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.x | |
| - name: Install NPM & Build Repo | |
| run: | | |
| yarn install && yarn build | |
| - name: Check JS Linting | |
| run: | | |
| yarn lint:js | |
| - name: Run Unit tests | |
| run: | | |
| yarn test:js | |
| - name: Start wp-env | |
| run: yarn wp-env start | |
| - name: Wait for WordPress to be ready | |
| run: | | |
| for i in {1..30}; do | |
| curl --head --fail http://tpbe.localhost:5438/wp-login.php && break | |
| echo "Waiting for wp-env..." | |
| sleep 2 | |
| done | |
| - name: Install Playwright dependencies | |
| run: npx playwright install-deps | |
| - name: Run E2E tests | |
| run: | | |
| yarn test:e2e |