Skip to content

NAC-294 Refactor endpoint params logic #510

NAC-294 Refactor endpoint params logic

NAC-294 Refactor endpoint params logic #510

Workflow file for this run

name: Lint
on:
pull_request:
branches:
- dev
workflow_call:
inputs:
branch:
description: 'The current branch'
default: dev
type: string
required: false
secrets:
NPM_PACKAGES_TOKEN:
description: 'NPM_PACKAGES_TOKEN'
required: true
GIT_TOKEN:
description: 'GIT_TOKEN'
required: true
env:
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'dev' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
- name: Remove .npmrc file if exists
run: |
if [ -f .npmrc ]; then
rm .npmrc
fi
- uses: actions/setup-node@v4
with:
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
node-version: 20
scope: '@nuxeo'
- name: Configure Additional Registries
run: |
npm config set @hylandsoftware:registry https://npm.pkg.github.com --global
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GIT_TOKEN }} --global
npm config set registry https://registry.npmjs.org/ --global
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Install @angular/cli
run: npm install -g @angular/cli
- name: Install Dependencies
working-directory: nuxeo-admin-console-web/angular-app
run: npm install
- name: Lint
working-directory: nuxeo-admin-console-web/angular-app
run: npm run lint