Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
simplify ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
amacneil committed Mar 11, 2021
1 parent 99d1e70 commit 4b2ab4a
Showing 1 changed file with 10 additions and 52 deletions.
62 changes: 10 additions & 52 deletions .github/workflows/ci.yml
Expand Up @@ -21,35 +21,17 @@ jobs:
command: lint:nofix
- name: test
command: test --maxWorkers=100%
- name: storybook
command: storybook:ci
- name: chromatic
command: chromatic

name: ${{ matrix.config.name }}

steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Configure Node.js
uses: actions/setup-node@v2.1.5
with:
node-version: 15.x
- name: Restore cache
uses: actions/cache@v2.1.4
with:
path: |
.yarn/cache
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- run: yarn run ${{ matrix.config.command }}

storybook:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Configure Node.js
uses: actions/setup-node@v2.1.5
Expand All @@ -65,46 +47,22 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Configure Google Cloud
if: matrix.config.name == 'storybook'
uses: google-github-actions/setup-gcloud@v0.2.1
with:
service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
export_default_credentials: true
- run: yarn install --immutable
- run: yarn run storybook:ci
- run: yarn run ${{ matrix.config.command }}
env:
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
REG_SUIT_GITHUB_CLIENT_ID: ${{ secrets.REG_SUIT_GITHUB_CLIENT_ID }}
REG_SUIT_HEAD_SHA: ${{ github.sha }}
# `base.sha` works for pull request events, `before` works for pushes to main
REG_SUIT_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}

chromatic:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Configure Node.js
uses: actions/setup-node@v2.1.5
with:
node-version: 15.x
- name: Restore cache
uses: actions/cache@v2.1.4
with:
path: |
.yarn/cache
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- run: yarn run chromatic
env:
CHROMATIC_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
CHROMATIC_BRANCH: ${{ github.event.pull_request.head.ref || github.ref }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

integration:
runs-on: ${{ matrix.os }}
strategy:
Expand Down

0 comments on commit 4b2ab4a

Please sign in to comment.