Skip to content

LG-3358, LG-3385 - Change Lottie dependency #169

LG-3358, LG-3385 - Change Lottie dependency

LG-3358, LG-3385 - Change Lottie dependency #169

Workflow file for this run

name: Pull Request CI
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Check lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
cache-dependency-path: 'yarn.lock'
- run: yarn install --frozen-lockfile --prefer-offline
- name: lint
run: yarn lint
outputs:
yarn-cache-dir: ${{ steps.get-yarn-cache-dir.outputs.dir }}
build:
name: Build packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
name: Check for build cache
id: build-cache
with:
path: |
**/dist
!**/node_modules
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/rollup.config.js', '**/babel.config.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
# Only setup & build if there was no build cache hit
- name: Use Node.js 16
uses: actions/setup-node@v3
if: ${{ steps.build-cache.outputs.cache-hit != 'true' }}
with:
node-version: '16'
cache: yarn
cache-dependency-path: 'yarn.lock'
- name: Install
if: ${{ steps.build-cache.outputs.cache-hit != 'true' }}
run: yarn install --frozen-lockfile --prefer-offline
- name: build
if: ${{ steps.build-cache.outputs.cache-hit != 'true' }}
run: yarn build
chromatic:
name: Chromatic
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
cache-dependency-path: 'yarn.lock'
- run: yarn install --frozen-lockfile --prefer-offline
- uses: actions/cache/restore@v3
name: Restore build cache
id: build-cache
with:
path: |
**/dist
!**/node_modules
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/rollup.config.js', '**/babel.config.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: 'build-storybook'
exitOnceUploaded: true
exitZeroOnChanges: true
tests:
name: Run tests
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
cache-dependency-path: 'yarn.lock'
- run: yarn install --frozen-lockfile --prefer-offline
- uses: actions/cache/restore@v3
name: Restore build cache
id: build-cache
with:
path: |
**/dist
!**/node_modules
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/rollup.config.js', '**/babel.config.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
- name: tests
run: yarn test --no-cache --ci --runInBand --reporters=default --reporters=jest-junit
env:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
tests-ssr:
name: Run tests with artificial server rendering
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
cache-dependency-path: 'yarn.lock'
- run: yarn install --frozen-lockfile --prefer-offline
- uses: actions/cache/restore@v3
name: Restore build cache
id: build-cache
with:
path: |
**/dist
!**/node_modules
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/rollup.config.js', '**/babel.config.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
- name: tests
run: yarn test --ssr --no-cache --ci --runInBand --reporters=default --reporters=jest-junit
env:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-ssr-results.xml'
validate-builds:
name: Validate builds & dependencies
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
cache-dependency-path: 'yarn.lock'
- run: yarn install --frozen-lockfile --prefer-offline
- uses: actions/cache/restore@v3
name: Restore build cache
id: build-cache
with:
path: |
**/dist
!**/node_modules
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/rollup.config.js', '**/babel.config.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
- uses: actions/cache/restore@v3
name: Restore TS cache
id: ts-cache
with:
path: |
**/dist/**/*.ts
!**/node_modules
key: ${{ runner.os }}-ts-cache-${{ hashFiles('**/tsconfig.js', '**/package.tsconfig.js', '**/src/', '**/scripts/', '!**/node_modules', '!**/dist') }}
- name: validate
run: yarn validate