Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
build: Use different workflows for push and pr (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fumler authored Aug 23, 2019
1 parent 6039892 commit d30176c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: shiny ci

on:
pull_request:

jobs:
matrix-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
if: github.event.action == 'opened' || github.event.action == 'synchronize'
- run: yarn test
if: github.event.action == 'opened' || github.event.action == 'synchronize'

chromatic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn install --frozen-lockfile
if: github.event.action == 'opened' || github.event.action == 'synchronize'
- run: yarn chromatic --exit-zero-on-changes
if: github.event.action == 'opened' || github.event.action == 'synchronize'
env:
CHROMATIC_APP_CODE: ${{ secrets.CHROMATIC_APP_CODE }}
3 changes: 1 addition & 2 deletions .github/workflows/config.yml → .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
pull_request:

jobs:
matrix-test:
Expand All @@ -31,6 +30,6 @@ jobs:
with:
node-version: 12
- run: yarn install --frozen-lockfile
- run: yarn chromatic
- run: yarn chromatic --auto-accept-changes
env:
CHROMATIC_APP_CODE: ${{ secrets.CHROMATIC_APP_CODE }}

0 comments on commit d30176c

Please sign in to comment.