diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f5f8f37e..a8601c2e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,164 +10,102 @@ on: merge_group: jobs: - setup: - name: Setup - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version-file: "package.json" - - - name: Restore dependencies - id: restore-dependencies - uses: actions/cache@v4 - with: - path: node_modules - key: js-depend-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} - - - name: Install dependencies - if: steps.restore-dependencies.outputs.cache-hit != 'true' - run: npm ci - - - name: Build third-party libraries - run: npm run build:libs - - - name: Upload workspace - uses: actions/upload-artifact@v4 - with: - name: workspace - path: . - js: - needs: setup name: JavaScript runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test JavaScript run: npm run test:js ts-main: - needs: setup name: TypeScript (main) runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test TypeScript (main) run: npm run test:ts:main ts-dev: - needs: setup - name: TypeScript + name: TypeScript (dev) runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test TypeScript (dev) run: npm run test:ts:dev ts-test: - needs: setup - name: TypeScript + name: TypeScript (test) runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test TypeScript (test) run: npm run test:ts:test ts-bench: - needs: setup - name: TypeScript + name: TypeScript (bench) runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test TypeScript (bench) run: npm run test:ts:bench css: - needs: setup name: CSS runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test CSS run: npm run test:css html: - needs: setup name: HTML runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test HTML run: npm run test:html markdown: - needs: setup name: Markdown runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test Markdown run: npm run test:md json: - needs: setup name: JSON runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Test JSON run: npm run test:json unit-tests: - needs: setup name: Unit Tests runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Run unit tests run: npm run test:unit @@ -176,14 +114,11 @@ jobs: run: npm run test:unit:options test-build: - needs: setup name: Test Build runs-on: ubuntu-latest steps: - - name: Download workspace - uses: actions/download-artifact@v4 - with: - name: workspace + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Build Legal run: npm run license-report:html @@ -199,12 +134,14 @@ jobs: fixSchemas: true bench: - needs: setup name: Benchmarks runs-on: ubuntu-latest steps: - - name: Run Benchmarks - uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2 - with: - token: ${{ secrets.CODSPEED_TOKEN }} - run: npm run bench + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup + + - name: Run Benchmarks + uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2 + with: + token: ${{ secrets.CODSPEED_TOKEN }} + run: npm run bench