Skip to content

Docs(icons): Transpile icons #DS-987 #11928

Docs(icons): Transpile icons #DS-987

Docs(icons): Transpile icons #DS-987 #11928

Workflow file for this run

name: πŸ” Code Quality Checks
on:
# Run this workflow on push to branches only (not tags)
push:
branches:
- '**'
schedule:
- cron: '0 9 * * *' # every day at 9:00
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_BRANCH: ${{ github.event.number || github.ref_name }}
NX_VERBOSE_LOGGING: true
NX_NO_CLOUD: true
CACHE_KEY: repository-cache-key-${{ github.run_id }}
jobs:
install-build:
name: 🧢 Install Deps and πŸ—οΈ Build Design Tokens
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install
- name: Build
run: yarn workspace @lmc-eu/spirit-design-tokens build
- name: Save Repository to Cache
id: save-repository-cache
uses: actions/cache/save@v4
with:
path: ./
key: ${{ env.CACHE_KEY }}
lint:
name: πŸ“ Code Linting
needs: [install-build]
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
HUSKY: 0
steps:
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: ${{ env.CACHE_KEY }}
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Lint
run: yarn lint
unit-tests:
name: πŸ§ͺ Unit Testing
needs: [install-build]
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
HUSKY: 0
steps:
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: ${{ env.CACHE_KEY }}
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Unit Tests
# Ignoring web-twig tests as they have separated workflow.
# See `test-web-twig.yaml` for web-twig unit tests.
run: yarn test:unit --ignore '@lmc-eu/spirit-web-twig'
- name: Publish Web Package Code Coverage
# When Nx hits its cloud cache, there is no generated coverage to sent, e.g. do not let this crash
if: ${{ hashFiles('./packages/web/.coverage/lcov.info') != '' }}
uses: coverallsapp/github-action@v2.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/web/.coverage/lcov.info
flag-name: web
carryforward: web-react, web-twig, analytics, design-tokens, icons, common, codemods, form-validations
- name: Publish Web-React Package Code Coverage
# When Nx hits its cloud cache, there is no generated coverage to sent, e.g. do not let this crash
if: ${{ hashFiles('./packages/web-react/.coverage/lcov.info') != '' }}
uses: coverallsapp/github-action@v2.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/web-react/.coverage/lcov.info
flag-name: web-react
carryforward: web, web-twig, analytics, design-tokens, icons, common, codemods, form-validations
- name: Publish Analytics Package Code Coverage
# When Nx hits its cloud cache, there is no generated coverage to sent, e.g. do not let this crash
if: ${{ hashFiles('./packages/analytics/.coverage/lcov.info') != '' }}
uses: coverallsapp/github-action@v2.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/analytics/.coverage/lcov.info
flag-name: analytics
carryforward: web, web-react, web-twig, design-tokens, icons, common, codemods, form-validations
format:
name: πŸ’… Code Formatting
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-install
- name: Check Code-Style Format
run: yarn format:check
types:
name: πŸ“˜ Type Checking
needs: [install-build]
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
HUSKY: 0
steps:
- name: Restore Repository from Cache
uses: actions/cache/restore@v4
id: restore-repository-cache
with:
path: ./
key: ${{ env.CACHE_KEY }}
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Types Check
run: yarn types
cleanup:
name: 🧹 Cleanup
needs: [lint, unit-tests, types]
runs-on: ubuntu-24.04
timeout-minutes: 10
# Ensure this job runs regardless of previous job outcomes
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
# @see: https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
- name: Cleanup cache
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ env.CACHE_KEY }}" --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}