-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (79 loc) · 2.31 KB
/
pr.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: PR validation
run-name: ${{ github.actor }} is running PR validation
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
paths-ignore:
- 'CHANGELOG.md'
merge_group:
types: [checks_requested]
concurrency:
cancel-in-progress: true
group: '${{ github.workflow }} @ ${{ github.ref }}'
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/prepare
conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set environment and install dependencies
uses: ./.github/actions/prepare
- name: Conventional Commits
uses: ./.github/actions/conventional-commits
lint-format:
name: Linting and formatting
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set environment and install dependencies
uses: ./.github/actions/prepare
- name: Get affected files
uses: ./.github/actions/get-affected-files
- name: Linting and formatting
uses: ./.github/actions/lint-format
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set environment and install dependencies
uses: ./.github/actions/prepare
- name: Get affected files
uses: ./.github/actions/get-affected-files
- name: Run unit tests
uses: ./.github/actions/unit-test
ci-validation:
name: CI validation
needs: [prepare, conventional-commits, lint-format, unit-tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Check jobs for errors
uses: actions/github-script@v7
with:
script: |
const checkJobsForErrors = require('./.github/workflows/js/check-for-errors.js');
const jobs = ${{ toJSON(needs) }};
checkJobsForErrors({ core, jobs });