Skip to content

Commit

Permalink
chore: tidy up workflows and bump action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
SiTaggart committed Jan 28, 2021
1 parent c132b52 commit db2b0f9
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 100 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,42 @@ on: push
jobs:
cypress:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore(release): publish')"
strategy:
matrix:
node-version: [12.18.x]
if: "!contains(github.event.head_commit.message, 'chore(release): version packages')"

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1

- uses: actions/cache@v2
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Bootstrap repository
run: yarn bootstrap
${{ runner.os }}-yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile && yarn bootstrap

- name: Build packages
run: yarn build

- name: Build website
run: yarn build:website
env:
AIRTABLE_APIKEY: ${{ secrets.AIRTABLE_APIKEY }}
AIRTABLE_BASEID: ${{ secrets.AIRTABLE_BASEID }}
GATSBY_DOCSEARCH_APIKEY: ${{ secrets.GATSBY_DOCSEARCH_APIKEY }}

- name: Run cypress
run: yarn test:website
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/package-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on: pull_request
jobs:
package-size:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
127 changes: 75 additions & 52 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,137 +5,160 @@ on: pull_request
jobs:
build_and_types:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1

- uses: actions/cache@v2
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-yarn
- name: restore lerna
uses: actions/cache@master
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Bootstrap repository
run: yarn bootstrap

- name: Install Dependencies
run: yarn install --frozen-lockfile && yarn bootstrap

- name: Build packages
run: yarn build

- name: Run type checker
run: yarn type-check

build_and_eslint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1

- uses: actions/cache@v2
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-yarn
- name: restore lerna
uses: actions/cache@master
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Bootstrap repository
run: yarn bootstrap

- name: Install Dependencies
run: yarn install --frozen-lockfile && yarn bootstrap

- name: Build packages
run: yarn build

- name: Run eslint
run: yarn lint

build_and_tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1

- uses: actions/cache@v2
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-yarn
- name: restore lerna
uses: actions/cache@master
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Bootstrap repository
run: yarn bootstrap

- name: Install Dependencies
run: yarn install --frozen-lockfile && yarn bootstrap

- name: Build packages
run: yarn build

- name: Run tests
run: yarn test

build_and_prettier:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1

- uses: actions/cache@v2
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-yarn
- name: restore lerna
uses: actions/cache@master
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Bootstrap repository
run: yarn bootstrap

- name: Install Dependencies
run: yarn install --frozen-lockfile && yarn bootstrap

- name: Build packages
run: yarn build

- name: Run prettier
run: yarn prettier
36 changes: 22 additions & 14 deletions .github/workflows/vrt_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,53 @@ name: VRT Main

on:
push:
paths:
- "packages/**"
branches:
- main

jobs:
chromatic:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore(release): publish')"
strategy:
matrix:
node-version: [12.18.x]
if: "!contains(github.event.head_commit.message, 'chore(release): version packages')"

steps:
- uses: actions/checkout@v2
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1

- name: Setup Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 12.x

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1

- uses: actions/cache@v2
name: Load Yarn cache
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-yarn
- name: restore lerna
uses: actions/cache@master
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Bootstrap repository
run: yarn bootstrap

- name: Install Dependencies
run: yarn install --frozen-lockfile && yarn bootstrap

- name: Build packages
run: yarn build

- name: Run Chromatic
uses: chromaui/action@v1
with:
Expand All @@ -50,6 +57,7 @@ jobs:
buildScriptName: "build:storybook"
autoAcceptChanges: "main"
exitOnceUploaded: true

- name: Run applitools eyes-storybook
run: yarn test:vrt
env:
Expand Down
Loading

2 comments on commit db2b0f9

@vercel
Copy link

@vercel vercel bot commented on db2b0f9 Jan 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on db2b0f9 Jan 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.