-
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.12 KB
/
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
40
41
42
43
44
45
name: Pull Request
on:
- pull_request
- pull_request_target
jobs:
test_coverage:
name: Test coverage
runs-on: ubuntu-latest
# Only needs to run on head branch since that will become the new base
# and coverage needs to pass before merging
if: ${{ github.event_name == 'pull_request' }}
strategy:
matrix:
node-version:
- 20.x
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm install
- name: Run tsc
run: npm run prestart
- name: Run test coverage
run: npm run test:coverage
labeler:
name: Pull Request labeler
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request_target' }}
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v5
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true