-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.14 KB
/
test.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
name: Test
on:
push:
branches-ignore: [main]
# Trigger this workflow on PRs created by Changesets by assigning it to
# someone. We need this workaround because PRs created by GitHub Actions do
# not trigger workflows per default.
pull_request:
branches: [main]
types: [assigned]
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: npm
- name: Install dependencies
# clean-install is faster and validates that package-lock.json matches the dependency definition in package.json
# while install afterward with integrity check later ensures that a follow-up PR does not have any pending change.
run: npm clean-install && npm install
- name: Lint source code
run: npm run lint
- name: Run tests
run: npm run test
- name: Build package
run: npm run build
- name: Check integrity of repository artifacts
uses: Qualifyze/check-git-integrity-action@v1