Small storybook fixes (#767) #618
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: Node CI (landed on protected branch) | |
on: | |
push: | |
branches: | |
- main | |
- changeset-release/* | |
- feature/* | |
# Our jobs run like this to minimize wasting resource cycles: | |
# 1. Prime caches for primary configuration. This way subsequent jobs | |
# can run in parallel but rely on this primed cache. | |
# 2. Coverage | |
# | |
# For pushes directly to a branch, we assume a PR has been used with wider | |
# checks, this just makes sure our coverage data is up-to-date. | |
jobs: | |
prime_cache_primary: | |
name: Prime node_modules cache for primary configuration | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Use a matrix as it means we get the version info in the job name | |
# which is very helpful. | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} & Install & cache node_modules | |
uses: Khan/actions@shared-node-cache-v0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
coverage: | |
needs: [prime_cache_primary] | |
name: Jest Coverage | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} & Install & cache node_modules | |
uses: Khan/actions@shared-node-cache-v0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Jest with coverage | |
run: yarn coverage | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/coverage-final.json | |
cypress: | |
needs: [prime_cache_primary] | |
name: Cypress | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
steps: | |
- name: Checking out latest commit | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} & Install & cache node_modules | |
uses: Khan/actions@shared-node-cache-v0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Run test with coverage | |
run: yarn cypress:ci |