Dont mess with og formatting for ci.yml
This commit is contained in:
+222
-227
@@ -2,134 +2,131 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: [ "master" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["master"]
|
branches: [ "master" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js 22.x
|
- name: Use Node.js 22.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
cache: "npm"
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Setup and run tsc
|
- name: Setup and run tsc
|
||||||
run: npm run setup
|
run: npm run setup
|
||||||
- name: Esbuild
|
- name: Esbuild
|
||||||
run: npm run esbuild
|
run: npm run esbuild
|
||||||
- name: Zip artifacts
|
- name: Zip artifacts
|
||||||
run: |
|
run: |
|
||||||
zip -r compressed-build \
|
zip -r compressed-build \
|
||||||
./lib/* \
|
./lib/* \
|
||||||
./out/* \
|
./out/* \
|
||||||
./out-*/* \
|
./out-*/* \
|
||||||
./addons/addon-attach/lib/* \
|
./addons/addon-attach/lib/* \
|
||||||
./addons/addon-attach/out/* \
|
./addons/addon-attach/out/* \
|
||||||
./addons/addon-attach/out-*/* \
|
./addons/addon-attach/out-*/* \
|
||||||
./addons/addon-clipboard/lib/* \
|
./addons/addon-clipboard/lib/* \
|
||||||
./addons/addon-clipboard/out/* \
|
./addons/addon-clipboard/out/* \
|
||||||
./addons/addon-clipboard/out-*/* \
|
./addons/addon-clipboard/out-*/* \
|
||||||
./addons/addon-fit/lib/* \
|
./addons/addon-fit/lib/* \
|
||||||
./addons/addon-fit/out/* \
|
./addons/addon-fit/out/* \
|
||||||
./addons/addon-fit/out-*/* \
|
./addons/addon-fit/out-*/* \
|
||||||
./addons/addon-image/lib/* \
|
./addons/addon-image/lib/* \
|
||||||
./addons/addon-image/out/* \
|
./addons/addon-image/out/* \
|
||||||
./addons/addon-image/out-*/* \
|
./addons/addon-image/out-*/* \
|
||||||
./addons/addon-kitty-graphics/lib/* \
|
./addons/addon-ligatures/lib/* \
|
||||||
./addons/addon-kitty-graphics/out/* \
|
./addons/addon-ligatures/out/* \
|
||||||
./addons/addon-kitty-graphics/out-*/* \
|
./addons/addon-ligatures/out-*/* \
|
||||||
./addons/addon-ligatures/lib/* \
|
./addons/addon-progress/lib/* \
|
||||||
./addons/addon-ligatures/out/* \
|
./addons/addon-progress/out/* \
|
||||||
./addons/addon-ligatures/out-*/* \
|
./addons/addon-progress/out-*/* \
|
||||||
./addons/addon-progress/lib/* \
|
./addons/addon-search/lib/* \
|
||||||
./addons/addon-progress/out/* \
|
./addons/addon-search/out/* \
|
||||||
./addons/addon-progress/out-*/* \
|
./addons/addon-search/out-*/* \
|
||||||
./addons/addon-search/lib/* \
|
./addons/addon-serialize/lib/* \
|
||||||
./addons/addon-search/out/* \
|
./addons/addon-serialize/out/* \
|
||||||
./addons/addon-search/out-*/* \
|
./addons/addon-serialize/out-*/* \
|
||||||
./addons/addon-serialize/lib/* \
|
./addons/addon-unicode11/lib/* \
|
||||||
./addons/addon-serialize/out/* \
|
./addons/addon-unicode11/out/* \
|
||||||
./addons/addon-serialize/out-*/* \
|
./addons/addon-unicode11/out-*/* \
|
||||||
./addons/addon-unicode11/lib/* \
|
./addons/addon-unicode-graphemes/lib/* \
|
||||||
./addons/addon-unicode11/out/* \
|
./addons/addon-unicode-graphemes/out/* \
|
||||||
./addons/addon-unicode11/out-*/* \
|
./addons/addon-unicode-graphemes/out-*/* \
|
||||||
./addons/addon-unicode-graphemes/lib/* \
|
./addons/addon-web-links/lib/* \
|
||||||
./addons/addon-unicode-graphemes/out/* \
|
./addons/addon-web-links/out/* \
|
||||||
./addons/addon-unicode-graphemes/out-*/* \
|
./addons/addon-web-links/out-*/* \
|
||||||
./addons/addon-web-links/lib/* \
|
./addons/addon-web-fonts/lib/* \
|
||||||
./addons/addon-web-links/out/* \
|
./addons/addon-web-fonts/out/* \
|
||||||
./addons/addon-web-links/out-*/* \
|
./addons/addon-web-fonts/out-*/* \
|
||||||
./addons/addon-web-fonts/lib/* \
|
./addons/addon-webgl/lib/* \
|
||||||
./addons/addon-web-fonts/out/* \
|
./addons/addon-webgl/out/* \
|
||||||
./addons/addon-web-fonts/out-*/* \
|
./addons/addon-webgl/out-*st/*
|
||||||
./addons/addon-webgl/lib/* \
|
- name: Upload artifacts
|
||||||
./addons/addon-webgl/out/* \
|
uses: actions/upload-artifact@v4
|
||||||
./addons/addon-webgl/out-*st/*
|
with:
|
||||||
- name: Upload artifacts
|
name: build-artifacts
|
||||||
uses: actions/upload-artifact@v4
|
path: compressed-build.zip
|
||||||
with:
|
if-no-files-found: error
|
||||||
name: build-artifacts
|
|
||||||
path: compressed-build.zip
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js 22.x
|
- name: Use Node.js 22.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
cache: "npm"
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
- name: Lint code
|
- name: Lint code
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max_old_space_size=4096
|
NODE_OPTIONS: --max_old_space_size=4096
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Lint API
|
- name: Lint API
|
||||||
run: npm run lint-api
|
run: npm run lint-api
|
||||||
|
|
||||||
test-unit-coverage:
|
test-unit-coverage:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js 22.x
|
- name: Use Node.js 22.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
cache: "npm"
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-artifacts
|
name: build-artifacts
|
||||||
- name: Unzip artifacts
|
- name: Unzip artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
||||||
else
|
else
|
||||||
unzip -o compressed-build.zip
|
unzip -o compressed-build.zip
|
||||||
fi
|
fi
|
||||||
ls -R
|
ls -R
|
||||||
- name: Unit test coverage
|
- name: Unit test coverage
|
||||||
run: |
|
run: |
|
||||||
npm run test-unit-coverage --forbid-only
|
npm run test-unit-coverage --forbid-only
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
./node_modules/.bin/nyc report --reporter=cobertura
|
./node_modules/.bin/nyc report --reporter=cobertura
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
|
|
||||||
test-unit:
|
test-unit:
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
@@ -139,34 +136,34 @@ jobs:
|
|||||||
runs-on: [ubuntu, macos, windows]
|
runs-on: [ubuntu, macos, windows]
|
||||||
runs-on: ${{ matrix.runs-on }}-latest
|
runs-on: ${{ matrix.runs-on }}-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}.x
|
- name: Use Node.js ${{ matrix.node-version }}.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}.x
|
node-version: ${{ matrix.node-version }}.x
|
||||||
cache: "npm"
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
- name: Wait for build job
|
- name: Wait for build job
|
||||||
uses: NathanFirmo/wait-for-other-job@v1.1.1
|
uses: NathanFirmo/wait-for-other-job@v1.1.1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
job: build
|
job: build
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-artifacts
|
name: build-artifacts
|
||||||
- name: Unzip artifacts
|
- name: Unzip artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
||||||
else
|
else
|
||||||
unzip -o compressed-build.zip
|
unzip -o compressed-build.zip
|
||||||
fi
|
fi
|
||||||
ls -R
|
ls -R
|
||||||
- name: Unit tests
|
- name: Unit tests
|
||||||
run: npm run test-unit --forbid-only
|
run: npm run test-unit --forbid-only
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
@@ -177,66 +174,64 @@ jobs:
|
|||||||
browser: [chromium, firefox, webkit]
|
browser: [chromium, firefox, webkit]
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}.x
|
- name: Use Node.js ${{ matrix.node-version }}.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}.x
|
node-version: ${{ matrix.node-version }}.x
|
||||||
cache: "npm"
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
- name: Install playwright
|
- name: Install playwright
|
||||||
run: npx playwright install --with-deps ${{ matrix.browser }}
|
run: npx playwright install --with-deps ${{ matrix.browser }}
|
||||||
- name: Wait for build job
|
- name: Wait for build job
|
||||||
uses: NathanFirmo/wait-for-other-job@v1.1.1
|
uses: NathanFirmo/wait-for-other-job@v1.1.1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
job: build
|
job: build
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-artifacts
|
name: build-artifacts
|
||||||
- name: Unzip artifacts
|
- name: Unzip artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
||||||
else
|
else
|
||||||
unzip -o compressed-build.zip
|
unzip -o compressed-build.zip
|
||||||
fi
|
fi
|
||||||
ls -R
|
ls -R
|
||||||
- name: Build demo client
|
- name: Build demo client
|
||||||
run: npm run esbuild-demo-client
|
run: npm run esbuild-demo-client
|
||||||
- name: Build demo server
|
- name: Build demo server
|
||||||
run: npm run esbuild-demo-server
|
run: npm run esbuild-demo-server
|
||||||
- name: Integration tests (core) # Tests use 50% workers to reduce flakiness
|
- name: Integration tests (core) # Tests use 50% workers to reduce flakiness
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
|
||||||
- name: Integration tests (addon-attach)
|
- name: Integration tests (addon-attach)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-attach
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-attach
|
||||||
- name: Integration tests (addon-clipboard)
|
- name: Integration tests (addon-clipboard)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-clipboard
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-clipboard
|
||||||
- name: Integration tests (addon-fit)
|
- name: Integration tests (addon-fit)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-fit
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-fit
|
||||||
- name: Integration tests (addon-image)
|
- name: Integration tests (addon-image)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-image
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-image
|
||||||
- name: Integration tests (addon-kitty-graphics)
|
- name: Integration tests (addon-progress)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-kitty-graphics
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-progress
|
||||||
- name: Integration tests (addon-progress)
|
- name: Integration tests (addon-search)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-progress
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-search
|
||||||
- name: Integration tests (addon-search)
|
- name: Integration tests (addon-serialize)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-search
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-serialize
|
||||||
- name: Integration tests (addon-serialize)
|
- name: Integration tests (addon-unicode-graphemes)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-serialize
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode-graphemes
|
||||||
- name: Integration tests (addon-unicode-graphemes)
|
- name: Integration tests (addon-unicode11)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode-graphemes
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode11
|
||||||
- name: Integration tests (addon-unicode11)
|
- name: Integration tests (addon-web-fonts)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode11
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-fonts
|
||||||
- name: Integration tests (addon-web-fonts)
|
- name: Integration tests (addon-web-links)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-fonts
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-links
|
||||||
- name: Integration tests (addon-web-links)
|
- name: Integration tests (addon-webgl)
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-links
|
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
|
||||||
- name: Integration tests (addon-webgl)
|
|
||||||
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
|
|
||||||
|
|
||||||
release-dry-run:
|
release-dry-run:
|
||||||
needs: build
|
needs: build
|
||||||
@@ -245,32 +240,32 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
node-version: [22]
|
node-version: [22]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}.x
|
- name: Use Node.js ${{ matrix.node-version }}.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}.x
|
node-version: ${{ matrix.node-version }}.x
|
||||||
cache: "npm"
|
cache: 'npm'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
- name: Install playwright
|
- name: Install playwright
|
||||||
run: npx playwright install
|
run: npx playwright install
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-artifacts
|
name: build-artifacts
|
||||||
- name: Unzip artifacts
|
- name: Unzip artifacts
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
pwsh -Command "7z x compressed-build.zip -aoa -o${{ github.workspace }}"
|
||||||
else
|
else
|
||||||
unzip -o compressed-build.zip
|
unzip -o compressed-build.zip
|
||||||
fi
|
fi
|
||||||
ls -R
|
ls -R
|
||||||
- name: Package headless
|
- name: Package headless
|
||||||
run: |
|
run: |
|
||||||
npm run package-headless
|
npm run package-headless
|
||||||
node ./bin/package_headless.js
|
node ./bin/package_headless.js
|
||||||
- name: Publish to npm (dry run)
|
- name: Publish to npm (dry run)
|
||||||
run: node ./bin/publish.js --dry
|
run: node ./bin/publish.js --dry
|
||||||
|
|||||||
Reference in New Issue
Block a user