-
Notifications
You must be signed in to change notification settings - Fork 33
48 lines (47 loc) · 1.18 KB
/
validatepr.yaml
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
# Workflow name
name: Validate PRs
on:
# Event for the workflow to run on
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
timeout-minutes: 8
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: npm run build-storybook
- name: Run unit test
run: npm run test
- uses: Eun/http-server-action@v1
with:
directory: ${{ github.workspace }}/storybook-static
port: 6006
no-cache: false
index-files: |
["index.html", "index.htm"]
allowed-methods: |
["GET", "HEAD"]
log: 'log.txt'
logTime: 'true'
- name: Test http server
run: |
curl -vvvv http://localhost:6006/index.html
cat log.txt
- name: Run tests
run: npm run test-storybook