-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #3297
- Loading branch information
Showing
7 changed files
with
210 additions
and
268 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Build | ||
run: yarn setup | ||
- name: Zip artifacts | ||
run: | | ||
zip -r compressed-build \ | ||
./out/* \ | ||
./out-test/* \ | ||
./addons/xterm-addon-attach/out/* \ | ||
./addons/xterm-addon-attach/out-test/* \ | ||
./addons/xterm-addon-canvas/out/* \ | ||
./addons/xterm-addon-canvas/out-test/* \ | ||
./addons/xterm-addon-fit/out/* \ | ||
./addons/xterm-addon-fit/out-test/* \ | ||
./addons/xterm-addon-image/inwasm-builds/out/* \ | ||
./addons/xterm-addon-image/out/* \ | ||
./addons/xterm-addon-image/out-test/* \ | ||
./addons/xterm-addon-ligatures/out/* \ | ||
./addons/xterm-addon-ligatures/out-test/* \ | ||
./addons/xterm-addon-search/out/* \ | ||
./addons/xterm-addon-search/out-test/* \ | ||
./addons/xterm-addon-serialize/out/* \ | ||
./addons/xterm-addon-serialize/out-test/* \ | ||
./addons/xterm-addon-unicode11/out/* \ | ||
./addons/xterm-addon-unicode11/out-test/* \ | ||
./addons/xterm-addon-web-links/out/* \ | ||
./addons/xterm-addon-web-links/out-test/* \ | ||
./addons/xterm-addon-webgl/out/* \ | ||
./addons/xterm-addon-webgl/out-test/* | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: compressed-build.zip | ||
if-no-files-found: error | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Lint code | ||
run: yarn lint | ||
- name: Lint API | ||
run: yarn lint-api | ||
|
||
unit-tests: | ||
needs: build | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
runs-on: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
- name: Unzip artifacts (Linux, macOS) | ||
if: runner.os != 'Windows' | ||
run: unzip -o compressed-build.zip | ||
- name: Unzip artifacts (Windows) | ||
if: runner.os == 'Windows' | ||
run: 7z x compressed-build.zip -aoa -o${{ github.workspace }} | ||
- name: Print directory structure | ||
run: ls -R | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Unit tests | ||
run: yarn test-unit --forbid-only | ||
|
||
integration-tests: | ||
needs: build | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
runs-on: [ubuntu-latest, windows-latest] # macos-latest is flaky | ||
browser: [chromium, firefox] | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
- name: Unzip artifacts (Linux, macOS) | ||
if: runner.os != 'Windows' | ||
run: unzip -o compressed-build.zip | ||
- name: Unzip artifacts (Windows) | ||
if: runner.os == 'Windows' | ||
run: 7z x compressed-build.zip -aoa -o${{ github.workspace }} | ||
- name: Print directory structure | ||
run: ls -R | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Install playwright | ||
run: npx playwright install | ||
- name: Integration tests (${{ matrix.browser }}) | ||
run: yarn test-api-${{ matrix.browser }} --headless --forbid-only |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '41 17 * * 0' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
# If a commit reaches master, assume it has passed CI via PR and publish | ||
# without running tests to save time to publish | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Build | ||
run: yarn setup | ||
- name: Package headless | ||
run: | | ||
yarn package-headless | ||
node ./bin/package_headless.js | ||
- name: Publish to npm | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: node ./bin/publish.js |
Oops, something went wrong.