chore(deps): update typescript-eslint monorepo to v7.9.0 (#1461) #4083
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 | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: | |
- main | |
paths: | |
- "packages/**/*" | |
- "config/*" | |
- "*.json" | |
- ".github/workflows/test.yml" | |
jobs: | |
test: | |
name: Test ${{ matrix.package }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
package: | |
[ | |
"docusaurus", | |
"core", | |
"diff", | |
"printer-legacy", | |
"utils", | |
"helpers", | |
"logger", | |
"graphql", | |
] | |
steps: | |
- name: Checkout Code Base | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup NodeJS LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
- name: Install modules | |
run: npm ci | |
- name: Run Unit Tests | |
id: unit | |
run: | | |
npm run test:ci /unit/ -- --coverage --reporters="github-actions" --reporters="summary" --selectProjects @graphql-markdown/${{ matrix.package }} | |
[ ! -d "./coverage/" ] && echo "skipped=1" >> "$GITHUB_OUTPUT" && exit 0 | |
mkdir -p packages/${{ matrix.package }}/.nyc_output/unit | |
mv ./coverage/coverage-final.json packages/${{ matrix.package }}/.nyc_output/unit.json | |
- name: Run Integration Tests | |
id: integration | |
run: | | |
npm run test:ci /integration/ -- --coverage --reporters="github-actions" --reporters="summary" --selectProjects @graphql-markdown/${{ matrix.package }} | |
[ ! -d "./coverage/" ] && echo "skipped=1" >> "$GITHUB_OUTPUT" && exit 0 | |
mkdir -p packages/${{ matrix.package }}/.nyc_output/integration | |
mv ./coverage/coverage-final.json packages/${{ matrix.package }}/.nyc_output/integration.json | |
- name: Check Code Coverage | |
id: coverage | |
if: ${{ !steps.unit.outputs.skipped && !steps.integration.outputs.skipped }} | |
run: | | |
[ ! -d "packages/${{ matrix.package }}/.nyc_output" ] && echo "skipped=1" >> "$GITHUB_OUTPUT" && exit 0 | |
cd packages/${{ matrix.package }} | |
npx -y --quiet nyc merge .nyc_output .nyc_output/coverage.json | |
npx -y --quiet nyc report --reporter=lcov --reporter=text --temp-dir .nyc_output | |
- name: SonarCloud Scan | |
id: sonarcloud | |
uses: SonarSource/sonarcloud-github-action@v2.1.1 | |
with: | |
projectBaseDir: ${{ github.workspace }} | |
args: > | |
-Dsonar.organization=graphql-markdown | |
-Dsonar.projectKey=graphql-markdown_${{ matrix.package }} | |
-Dsonar.sources=./packages/${{ matrix.package }}/src | |
-Dsonar.tests=./packages/${{ matrix.package }}/tests | |
-Dsonar.javascript.lcov.reportPaths=./packages/${{ matrix.package }}/coverage/lcov.info | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
build: | |
name: Mock Build | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout Code Base | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
- name: Install modules | |
run: npm ci | |
- name: TS Build | |
run: npm run build |