Skip to content

feat(cli): add normalizedPath and support file duplicates by name #203

feat(cli): add normalizedPath and support file duplicates by name

feat(cli): add normalizedPath and support file duplicates by name #203

Workflow file for this run

name: PR Update
on:
pull_request:
workflow_dispatch:
env:
pr_id: ${{ github.event.number }}
concurrency:
group: pr-update-${{ github.event.number }}
cancel-in-progress: true
jobs:
setup:
name: NPM install, build & cache
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version: ${{ vars.node_version }}
- name: node_modules cache
id: node-modules-cache
uses: actions/cache@v3
env:
cache_name: node-modules-npm
cache_key: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}
restore-keys: ${{ runner.os }}-${{ env.cache_name }}-
- name: NPM install
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm ci
build:
name: Build packages & cache
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version: ${{ vars.node_version }}
- name: Restore node_modules from cache
uses: actions/cache@v3
env:
cache_name: node-modules-npm
cache_key: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}
# for this run only
- name: Cache built packages
uses: actions/cache@v3
env:
cache_name: built-packages
node_version: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: 'packages/*/dist'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}-${{ github.sha }}
- name: Build packages
run: npm run build -ws
commitlint:
name: Commit Lint
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 20
- name: Set node version
uses: actions/setup-node@v3
with:
node-version: ${{ vars.node_version }}
- name: Restore node_modules from cache
uses: actions/cache@v3
env:
cache_name: node-modules-npm
cache_key: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}
- name: Check the commit message
run: npx --no -- commitlint --from HEAD~${{ github.event.pull_request.commits }}
lint:
name: Linters
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version: ${{ vars.node_version }}
- name: Restore node_modules from cache
uses: actions/cache@v3
env:
cache_name: node-modules-npm
cache_key: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}
# needed for tsc check
- name: Build Core package
run: npm run build -w=packages/core
- name: Lint the code
run: npm run lint
test:
name: E2E & Unit Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set node version
uses: actions/setup-node@v3
with:
node-version: ${{ vars.node_version }}
- name: Restore node_modules from cache
uses: actions/cache@v3
env:
cache_name: node-modules-npm
cache_key: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}
- name: Restore built packages from cache
uses: actions/cache@v3
env:
cache_name: built-packages
node_version: ${{ vars.node_version }}-${{ hashFiles('package-lock.json') }}
with:
path: 'packages/*/dist'
key: ${{ runner.os }}-${{ env.cache_name }}-${{ env.cache_key }}-${{ github.sha }}
- name: Run tests
run: npm test