Skip to content

Commit

Permalink
Target tags for action. Snapshot on label
Browse files Browse the repository at this point in the history
  • Loading branch information
xdrdak committed Jun 29, 2020
1 parent df4c070 commit 9d64bbb
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 32 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/chromatic-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Chromatic on label
on: [pull_request]

jobs:
snapshot:
name: Run visual regression tests with chromatic (label triggered)
if: github.event.label.name == 'snapshot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Read .nvmrc
run: echo ::set-output name=nvmrc::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1.1.1
with:
node-version: '${{ steps.nvm.outputs.nvmrc }}'
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.OS }}-yarn-cache-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-v1-
- name: Install
run: yarn install --frozen-lockfile && yarn bootstrap
- uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/publish-lerna.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches:
- master
- next
tags:
- '@lightspeed*'

name: Publish lerna
jobs:
publish:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-mainline.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches:
- master
- next
tags:
- '@lightspeed*'

name: Publish mainline
jobs:
publish:
Expand Down
56 changes: 30 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,33 @@ jobs:
name: Test, lint, typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Read .nvmrc
run: echo ::set-output name=nvmrc::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1.1.1
with:
node-version: '${{ steps.nvm.outputs.nvmrc }}'
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.OS }}-yarn-cache-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-v1-
- name: Install
run: yarn install --frozen-lockfile
- name: Bootstrap
run: yarn bootstrap
- name: Test
run: yarn test:ci
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Lint
run: yarn lint
- name: Typecheck
run: yarn typecheck
- uses: actions/checkout@master
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Read .nvmrc
run: echo ::set-output name=nvmrc::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1.1.1
with:
node-version: '${{ steps.nvm.outputs.nvmrc }}'
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.OS }}-yarn-cache-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-v1-
- name: Install
run: yarn install --frozen-lockfile
- name: Bootstrap
run: yarn bootstrap
- name: Test
run: yarn test:ci
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Lint
run: yarn lint
- name: Typecheck
run: yarn typecheck

0 comments on commit 9d64bbb

Please sign in to comment.