forked from directus/directus
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 1.63 KB
/
check.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
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
70
name: Check
on:
pull_request:
branches:
- main
- v11-rc
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=6144
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
with:
build: false
- name: Run Linter
run: pnpm exec eslint ${{ steps.changed-files.outputs.all_changed_files }}
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
with:
build: false
- name: Run Formatter
run: pnpm exec prettier --check --ignore-unknown ${{ steps.changed-files.outputs.all_changed_files }}
unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Vitest uses `git diff` under the hood to find the changed files in it's `--changed`
# option, which in turn means we need to fetch the full git history so git is able to diff
fetch-depth: 0
- name: Prepare
uses: ./.github/actions/prepare
- name: Run Tests
run: pnpm test -- -- --changed origin/${{ github.base_ref }} --passWithNoTests