-
Notifications
You must be signed in to change notification settings - Fork 13
69 lines (69 loc) · 1.94 KB
/
pull-request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Pull Request
on:
pull_request:
types: [opened, synchronize]
jobs:
configure:
runs-on: ubuntu-latest
outputs:
mongodb_version: ${{ steps.define.outputs.MONGODB_VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- id: define
run: |
cat .env.template | grep MONGODB_VERSION >> "$GITHUB_OUTPUT"
build:
name: Build, Lint, and Test
runs-on: ubuntu-latest
needs: configure
services:
mongo:
image: mongo:${{needs.configure.outputs.mongodb_version}}
ports:
- 27017:27017
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- name: Cache Cypress Binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Cache Turbo
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup Environment
run: pnpm generate:env
- name: Install Dependencies
run: |
pnpm install --frozen-lockfile
pnpm cy:install
- name: Verify Cypress
env:
CI: 1
run: |
pnpm exec cypress verify
pnpm exec cypress info
pnpm exec cypress version
pnpm exec cypress version --component package
pnpm exec cypress version --component binary
pnpm exec cypress version --component electron
pnpm exec cypress version --component node
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
env:
TERM: xterm