Bump eslint from 8.57.0 to 9.6.0 #86
Workflow file for this run
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: Test External | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
moduleSet: | |
description: 'Module set' | |
required: true | |
default: 'nonCompliant' | |
type: choice | |
options: | |
- compliant | |
- nonCompliant | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
read_external_projects: | |
name: Read list of ${{ github.event.inputs.moduleSet || 'compliant' }} external projects | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-matrix | |
run: echo "matrix=$(cat workflow-external.json | jq -c '.${{ github.event.inputs.moduleSet || 'compliant' }}')" >> $GITHUB_OUTPUT | |
test_external: | |
needs: read_external_projects | |
name: Test ${{ matrix.project }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node_version: [lts/*] | |
project: ${{ fromJson(needs.read_external_projects.outputs.matrix) }} | |
steps: | |
- name: Checkout main project | |
uses: actions/checkout@v4 | |
with: | |
path: main | |
- name: Checkout ${{ matrix.project }} | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ matrix.project }} | |
path: project | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Determine npm cache directory windows | |
id: npm-cache-dir-windows | |
if: runner.os == 'Windows' | |
run: echo "dir=$(npm config get cache)" >> $env:GITHUB_OUTPUT | |
- name: Determine npm cache directory non-windows | |
id: npm-cache-dir | |
if: runner.os != 'Windows' | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.npm-cache-dir-windows.outputs.dir || steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: install main | |
run: npm i --no-audit --no-fund | |
working-directory: ./main | |
- name: install project | |
run: '[ -f package-lock.json ] && npm ci --force || npm install --force' | |
working-directory: ./project | |
- name: modify project eslint config | |
run: sed 's/"@socketsecurity"/"..\/main\/test.eslintrc"/' .eslintrc > tmp.eslintrc && rm .eslintrc && mv tmp.eslintrc .eslintrc | |
working-directory: ./project | |
- name: modify project eslint config (ESM version) | |
run: sed 's/"@socketsecurity\/eslint-config\/jsdoc"/"..\/main\/test-jsdoc.eslintrc"/' .eslintrc > tmp.eslintrc && rm .eslintrc && mv tmp.eslintrc .eslintrc | |
working-directory: ./project | |
- name: run eslint | |
run: ../main/node_modules/.bin/eslint --resolve-plugins-relative-to ../main --ext js --ext cjs --ext mjs --report-unused-disable-directives . | |
working-directory: ./project |