chore(main): release 20.0.0-beta.1 (#323) #1014
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: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
moduleSet: | |
description: 'Module set' | |
required: true | |
default: 'nonCompliant' | |
type: choice | |
options: | |
- compliant | |
- preFlatconfigCompliant | |
- 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: '[ -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: run eslint | |
run: ../main/node_modules/.bin/eslint -c ../main/eslint.config.js | |
working-directory: ./project |