Skip to content

Speed up CI by parallelizing more things #4577

Speed up CI by parallelizing more things

Speed up CI by parallelizing more things #4577

Workflow file for this run

name: CI
permissions:
contents: read
on:
push:
branches: [master]
pull_request:
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
- 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
- name: Test TypeScript (main)
run: npm run test:ts:main
ts-dev:
needs: setup
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: workspace
- name: Test TypeScript (dev)
run: npm run test:ts:dev
ts-test:
needs: setup
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: workspace
- name: Test TypeScript (test)
run: npm run test:ts:test
ts-bench:
needs: setup
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: workspace
- 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
- 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
- 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
- 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
- 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
- name: Run unit tests
run: npm run test:unit
- name: Run unit tests (options)
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
- name: Build Legal
run: npm run license-report:html
- name: Build
run: npm run build
- name: Validate manifest.json of the extension
uses: cardinalby/schema-validator-action@2166123eb256fa40baef7e22ab1379708425efc7 # v3.1.1
with:
file: ext/manifest.json
schema: "https://json.schemastore.org/chrome-manifest.json"
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