-
Notifications
You must be signed in to change notification settings - Fork 37
38 lines (31 loc) · 909 Bytes
/
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
name: Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
if: (github.event_name != 'pull_request' && !github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
env:
CI: true
steps:
- name: Checkout Repo
uses: actions/checkout@main
- name: Set up pnpm
uses: pnpm/action-setup@v3
- name: Setup Node.js
uses: actions/setup-node@main
with:
node-version-file: 'package.json'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm i
- name: Test
run: |
pnpm test
pnpm storybook:build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: built-storybook
path: storybook-static
if-no-files-found: error