Skip to content

Merge pull request #88 from ed-software/release-please--branches--mai… #147

Merge pull request #88 from ed-software/release-please--branches--mai…

Merge pull request #88 from ed-software/release-please--branches--mai… #147

Workflow file for this run

name: 'CI'
on: push
env:
NODE_VERSION: '18.12.1'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Check code format
run: npm run prettier:check
- name: Check code format
run: npm run eslint
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
env:
HAS_CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
steps:
- uses: actions/checkout@v1
- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
if: ${{ env.HAS_CHROMATIC_PROJECT_TOKEN }}
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
run: npm ci
# 👇 Adds Chromatic as a step in the workflow
- name: Publish to Chromatic
if: ${{ env.HAS_CHROMATIC_PROJECT_TOKEN }}
uses: chromaui/action-next@v1
# Chromatic GitHub Action options
with:
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}