Skip to content

Rename to chart-io #186

Rename to chart-io

Rename to chart-io #186

Workflow file for this run

---
name: Pull Requests
on:
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2.2.2
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: pnpm Install
run: pnpm install
- name: Lint
run: pnpm run lint
# audit:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'ci skip')"
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# - uses: pnpm/action-setup@v2.2.2
# with:
# run_install: false
# - name: Get pnpm store directory
# id: pnpm-cache
# run: |
# echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
# key: ${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# - name: pnpm Install
# run: pnpm install
# - name: Run Audit
# run: pnpm audit --production --audit-level moderate
unit:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2.2.2
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: pnpm Install
run: pnpm install
- name: Run Unit Tests
run: pnpm test
chromatic:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && github.event.pull_request.draft == false"
needs: [lint, unit]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2.2.2
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: pnpm Install
run: pnpm install
- name: Chromatic
run: |
cd packages/react
npx chromatic --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes --only-changed