Add Ringmaster and update dependencies #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Master | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Test, build and publish to Chromatic | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Required to retrieve git history for Chromatic | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: current | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Create mock service worker | |
run: npm run msw | |
- name: Run unit tests | |
run: npm run coverage | |
- name: Build website | |
run: npm run build | |
- name: Report coverage | |
uses: codecov/codecov-action@v3 | |
- name: Publish to Chromatic | |
uses: chromaui/action@v1 | |
with: | |
autoAcceptChanges: master | |
buildScriptName: build-storybook | |
exitOnceUploaded: true | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
e2e: | |
name: Run E2E tests | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Run Cypress | |
uses: cypress-io/github-action@v4 | |
with: | |
build: npm run e2e:build | |
start: npm start |