n8n/.github/workflows/ci-pull-requests.yml

47 lines
1 KiB
YAML
Raw Normal View History

name: Test Pull Requests
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v3
2022-11-09 08:32:05 -08:00
- uses: pnpm/action-setup@v2.2.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
2022-11-09 08:32:05 -08:00
cache: 'pnpm'
2022-11-09 08:32:05 -08:00
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
2022-11-09 08:32:05 -08:00
run: pnpm build
- name: Test
2022-11-09 08:32:05 -08:00
run: pnpm test
- name: Test E2E
2022-11-09 08:32:05 -08:00
run: |
pnpm cypress:install
pnpm test:e2e:smoke
- 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
env:
ESLINT_PLUGIN_DIFF_COMMIT: ${{ github.event.pull_request.base.ref }}
2022-11-09 08:32:05 -08:00
run: pnpm lint