Feat/editor #2719
Workflow file for this run
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: Node.js CI | |
on: | |
push: | |
branches: [dev, staging, production, v2] | |
pull_request: | |
branches: [dev, staging, production, v2] | |
concurrency: | |
group: bangle-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
SENTRY_NO_PROGRESS_BAR: 1 | |
GITHUB_OWNER: ${{ secrets.GH_OWNER }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm run lint | |
- name: constraints | |
run: pnpm run test:constraints | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: test | |
run: pnpm run test:ci | |
e2e-tests: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
container: mcr.microsoft.com/playwright:v1.39.0-focal | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set git safe directory | |
# This is added as a fix for https://github.com/actions/checkout/issues/766 | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Playwright Browsers | |
run: pnpm -r --filter e2e-tests playwright-install | |
- name: Run Playwright tests | |
run: pnpm run test:e2e | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: packages/e2e-tests/playwright-report/ | |
retention-days: 7 |