Skip to content

ARCHIVE: Feat/icon button refactor #3268

ARCHIVE: Feat/icon button refactor

ARCHIVE: Feat/icon button refactor #3268

Workflow file for this run

name: build-pr
on:
pull_request:
branches:
- main
jobs:
prettier:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap
- name: Run Prettier
run: |
yarn format
- name: Check for uncommitted changes
run: |
sh scripts/porcelain.sh
tslint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap
- name: Run TSLint
run: |
yarn workspace @telekom/scale-components lint
unit-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap
- name: Run unit tests
run: |
yarn workspace @telekom/scale-components test --spec --max-workers=8
e2e-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap
- name: Generate files
run: |
yarn lerna run generate
- name: Run e2e tests
run: |
yarn workspace @telekom/scale-components test --e2e --max-workers=8 --debug
visual-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap
- name: Generate files
run: |
yarn lerna run generate
- name: Build Components
if: steps.components-cache.outputs.cache-hit != 'true'
run: |
yarn workspace @telekom/scale-components build
- name: Build Storybook
if: steps.storybook-cache.outputs.cache-hit != 'true'
run: |
yarn workspace @telekom/scale-storybook-vue build --quiet
- name: Copy Storybook for visual tests
run: |
yarn workspace @telekom/scale-visual-tests copy
- name: Run visual tests
id: visual-tests
run: |
yarn workspace @telekom/scale-visual-tests test:ci -u
- name: Check for any snapshots changes
run: |
sh scripts/porcelain.sh
- name: Set patch branch name
if: failure()
id: vars
run: echo ::set-output name=branch-name::"visual-snapshots/${{ github.head_ref }}"
- name: Create pull request with new snapshots
if: failure()
uses: peter-evans/create-pull-request@v4
with:
commit-message: 'test(visual): update snapshots'
title: 'update visual snapshots: ${{ github.event.pull_request.title }}'
body: This is an auto-generated PR with visual snapshot updates for \#${{ github.event.number }}.
labels: automated pr
branch: ${{ steps.vars.outputs.branch-name }}
uncommitted-changes:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap
- name: Generate files
run: |
yarn lerna run generate
- name: Build Components
run: |
yarn workspace @telekom/scale-components build
- name: Check for uncommitted changes
run: |
sh scripts/porcelain.sh