Skip to content

chore!: update dependency eslint to ^8.57.0 - autoclosed #721

chore!: update dependency eslint to ^8.57.0 - autoclosed

chore!: update dependency eslint to ^8.57.0 - autoclosed #721

Workflow file for this run

name: Test External
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
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@v3
- 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@v3
with:
path: main
- name: Checkout ${{ matrix.project }}
uses: actions/checkout@v3
with:
repository: ${{ matrix.project }}
path: project
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
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@v3
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: '[ -f package-lock.json ] && npm ci --ignore-scripts --force || npm install --ignore-scripts --force'
working-directory: ./main
- name: install project
run: '[ -f package-lock.json ] && npm ci --ignore-scripts --force || npm install --ignore-scripts --force'
working-directory: ./project
- name: build project if needed
run: npm run build-for-test --if-present
working-directory: ./project
- name: modify project eslint config
run: sed 's/"@voxpelli"/"..\/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/"@voxpelli\/eslint-config\/esm"/"..\/main\/test-esm.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