-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (34 loc) · 937 Bytes
/
pr.yml
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
on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
types: [checks_requested]
# cancel previous runs on the same PR
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
name: ⛷ PR tests
env:
CI: true
TARGET_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
defaults:
run:
shell: bash
jobs:
build-format-lint-test:
name: 🚀 Build, lint and test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: "📥️ Checkout"
uses: actions/checkout@v3
with:
ref: ${{ env.TARGET_SHA }}
- name: "⚙️📦️ Install & cache node dependencies"
uses: ./.github/actions/install-node-deps
- name: "⚙️🛠️ Build"
run: yarn build
- name: "🧪🖼️ Test linter"
run: yarn test:lint
- name: "🧪🔬 Run unit tests"
run: yarn test:unit