-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.2 KB
/
pull-request.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
name: Pull Request
on:
pull_request:
jobs:
test_for_changeset:
runs-on: ubuntu-latest
if: github.head_ref != 'changeset-release/main'
name: Test for presence of new Changeset files
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get .changeset changes
id: changeset-files
uses: tj-actions/changed-files@v35
with:
files: .changeset/*.md
- name: Check for added files
id: changeset-check-added
run: |
echo "Valid PRs must have a new changeset file."
test -n "${{ steps.changeset-files.outputs.added_files }}"
lint_build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
always-auth: true
cache: yarn
node-version: 16
- name: Install yarn packages
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Persist build output as artifact
uses: actions/upload-artifact@v3
with:
name: build
path: build