2022-08-26 01:27:04 -07:00
|
|
|
name: Test Pull Requests
|
2019-12-24 16:25:44 -08:00
|
|
|
|
2022-09-14 01:50:42 -07:00
|
|
|
on: [pull_request]
|
2019-12-24 16:25:44 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2022-03-16 02:32:49 -07:00
|
|
|
timeout-minutes: 30
|
|
|
|
|
2019-12-24 16:25:44 -08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-11-07 08:23:08 -08:00
|
|
|
node-version: [14.x, 16.x]
|
2019-12-24 16:25:44 -08:00
|
|
|
|
|
|
|
steps:
|
2022-09-21 01:24:39 -07:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-11-09 08:32:05 -08:00
|
|
|
- uses: pnpm/action-setup@v2.2.4
|
|
|
|
|
2022-08-19 06:34:02 -07:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-09-20 11:59:49 -07:00
|
|
|
uses: actions/setup-node@v3
|
2022-08-19 06:34:02 -07:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-11-09 08:32:05 -08:00
|
|
|
cache: 'pnpm'
|
2022-09-21 01:24:39 -07:00
|
|
|
|
2022-11-09 08:32:05 -08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install --frozen-lockfile
|
2022-09-21 01:24:39 -07:00
|
|
|
|
2022-10-10 10:50:26 -07:00
|
|
|
- name: Build
|
2022-11-09 08:32:05 -08:00
|
|
|
run: pnpm build
|
2022-10-10 10:50:26 -07:00
|
|
|
|
|
|
|
- name: Test
|
2022-11-09 08:32:05 -08:00
|
|
|
run: pnpm test
|
2022-10-10 10:50:26 -07:00
|
|
|
|
2022-11-08 04:21:10 -08:00
|
|
|
- name: Test E2E
|
2022-11-09 08:32:05 -08:00
|
|
|
run: |
|
|
|
|
pnpm cypress:install
|
2022-11-24 03:49:01 -08:00
|
|
|
pnpm test:e2e:smoke
|
2022-11-08 04:21:10 -08:00
|
|
|
|
2022-09-21 01:24:39 -07:00
|
|
|
- name: Fetch base branch for `git diff`
|
|
|
|
run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
|
|
|
|
|
|
|
|
- name: Run ESLint on changes only
|
2022-08-19 06:34:02 -07:00
|
|
|
env:
|
2022-09-21 01:24:39 -07:00
|
|
|
ESLINT_PLUGIN_DIFF_COMMIT: ${{ github.event.pull_request.base.ref }}
|
2022-11-09 08:32:05 -08:00
|
|
|
run: pnpm lint
|