Merge branch 'beta' into renovate/storybook-core #1196
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: CI | |
on: | |
push: | |
branches-ignore: | |
- main | |
- beta | |
- release/latest | |
- release/beta | |
jobs: | |
commit-checks: | |
name: Lint, test, and build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Install packages | |
run: npm ci | |
- name: Type-checking | |
run: npm run ci:typecheck | |
- name: Jest, ESLint | |
run: npm run ci:test | |
- name: Upload test reports | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: Tests | |
path: reports/tests-junit.xml | |
reporter: jest-junit | |
- name: Webpack build (prod) | |
run: npm run build:prod | |
- name: Webpack build (Roam Depot) | |
run: npm run build:roam | |
- name: Webpack build (sandbox) | |
run: npm run build:sandbox | |
- name: Commit to repository | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "auto-commit: lint, test, build" | |
continue-on-error: true # See https://github.com/stefanzweifel/git-auto-commit-action/issues/204 | |
- name: Storybook CI | |
id: chromatic | |
uses: chromaui/action@v1 | |
if: ${{ !startsWith(github.ref_name, 'renovate/') }} | |
with: | |
buildScriptName: "build-storybook" | |
exitOnceUploaded: true | |
onlyChanged: true | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
exitZeroOnChanges: true | |
- name: Storybook tests | |
if: ${{ !startsWith(github.ref_name, 'renovate/') }} | |
run: npm run ci:test-storybook | |
env: | |
TARGET_URL: "${{ steps.chromatic.outputs.storybookUrl }}" | |
JEST_JUNIT_OUTPUT_DIR: "reports" | |
JEST_JUNIT_OUTPUT_NAME: "storybook-junit.xml" | |
- name: Upload test reports | |
uses: dorny/test-reporter@v1 | |
if: ${{ !startsWith(github.ref_name, 'renovate/') }} | |
with: | |
name: Storybook | |
path: reports/storybook-junit.xml | |
reporter: jest-junit | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: ./coverage/ | |
verbose: true | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |