-
Notifications
You must be signed in to change notification settings - Fork 134
48 lines (38 loc) · 932 Bytes
/
pull-request.yaml
File metadata and controls
48 lines (38 loc) · 932 Bytes
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
name: Pull Request Example
on:
pull_request:
branches:
- main
paths:
- typescript-project/**
workflow_dispatch:
jobs:
pull-request:
runs-on: ubuntu-latest
defaults:
run:
working-directory: typescript-project
steps:
- uses: actions/checkout@v2
# Setup Nodejs
- name: Setup Node.js 16
uses: actions/setup-node@v2
with:
node-version: "16.x"
cache: 'npm'
cache-dependency-path: typescript-project/yarn.lock
# Install Yarn
- name: Install Yarn
run: npm install --global yarn
# Install libraries
- name: Install dependencies
run: yarn install --frozen-lockfile
# Run linting
- name: Run linting
run: yarn lint
# Compile the code
- name: Build project
run: yarn build
# Run tests
- name: Run tests
run: yarn test