NAC-296: folder should accept both id and path #571
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |