Skip to content

Commit 2614f28

Browse files
tulirenjrhizor
andauthored
Add github action and stoat (#1)
- Add GitHub workflow to run continuous integration. - Add Stoat integration to preview build outputs on pull requests. Co-authored-by: jrhizor <me@jaredrhizor.com>
1 parent bd07752 commit 2614f28

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Continuous Integration
2+
3+
on:
4+
# Trigger the ci pipeline for every comment on the default branch or a pull request.
5+
# The default branch for the sample repo is `master`.
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
ci:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Set up node and cache
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '16.8.0'
24+
cache: 'yarn'
25+
26+
- name: Install dependencies
27+
run: yarn install --frozen-lockfile --prefer-offline
28+
29+
# This project has a `coverage` script that runs all the
30+
# tests and merge all their coverage reports.
31+
- name: Run tests and generate report
32+
run: yarn coverage
33+
34+
- name: Generate storybook
35+
run: yarn build-storybook
36+
37+
# Run the Stoat action to upload and host all the build outputs.
38+
- name: Run stoat action
39+
uses: stoat-dev/stoat-action@v0
40+
if: always()

.stoat/config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 1
2+
enabled: true
3+
plugins:
4+
job_runtime:
5+
enabled: true
6+
static_hosting:
7+
merged-test-coverage:
8+
metadata:
9+
name: Test coverage report
10+
path: coverage/merged/lcov-report
11+
storybook:
12+
metadata:
13+
name: Storybook
14+
path: storybook-static
15+
cypress-video:
16+
metadata:
17+
name: Cypress video
18+
path: cypress/videos/spec.js.mp4

0 commit comments

Comments
 (0)