-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.31 KB
/
storybook-tests.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
name: "Storybook Tests"
on:
pull_request:
types: [opened, edited, reopened, synchronize]
paths:
- "packages/wethegit-components/**"
- "yarn.lock"
- "**/package.json"
push:
branches:
- main
paths:
- "packages/wethegit-components/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency: ${{ github.workflow }}-${{ github.ref }}-storybook-tests
jobs:
# Install and cache npm dependencies
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
- name: Install Dependencies
run: yarn install --immutable
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: npx turbo run build --filter=@wethegit/components
- name: Serve Storybook and run tests
working-directory: ./packages/wethegit-components
run: yarn test-storybook:ci