Bump mocha from 11.0.2 to 11.1.0 #377
Workflow file for this run
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
# Copyright (C) 2019-2025 | |
# Julian Valentin, Daniel Spitzer, LTeX+ Development Community | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
name: "CI" | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- "develop" | |
workflow_dispatch: | |
jobs: | |
buildForVsCode: | |
name: "CI - Build for VS Code Job" | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: | |
- "ubuntu-latest" | |
- "macos-latest" | |
- "windows-latest" | |
steps: | |
- name: "Checkout Repository" | |
uses: "actions/checkout@v4" | |
- name: "Set up Node.js" | |
uses: "actions/setup-node@v4" | |
with: | |
node-version: 22 | |
- name: "Install Node.js Dependencies" | |
run: "npm install && npm install -g @vscode/vsce" | |
- name: "Set up Python" | |
uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.13" | |
- name: "Install Python Dependencies" | |
run: "python -u -m pip install --upgrade pip && pip install semver" | |
- name: "Start X Virtual Frame Buffer" | |
if: "${{ startsWith(matrix.os, 'ubuntu-') }}" | |
run: "echo \"DISPLAY=:99.0\" >> $GITHUB_ENV && Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" | |
- name: "Build Package with vsce" | |
run: "vsce package" | |
- name: "Run ESLint" | |
run: "npm run lint" | |
- name: "Run Mocha Tests (Linux)" | |
if: "${{ startsWith(matrix.os, 'ubuntu-') }}" | |
env: | |
LTEX_GITHUB_OAUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
# to suppress "async hook stack has become corrupted" errors | |
# (https://github.com/microsoft/vscode/issues/85601) | |
NODE_OPTIONS: "--no-force-async-hooks-checks" | |
run: "npm run test" | |
- name: "Run Mocha Tests (Windows)" | |
if: "${{ startsWith(matrix.os, 'windows-') }}" | |
env: | |
LTEX_GITHUB_OAUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
# to suppress "async hook stack has become corrupted" errors | |
# (https://github.com/microsoft/vscode/issues/85601) | |
NODE_OPTIONS: "--no-force-async-hooks-checks" | |
# otherwise, git clean fails to remove lib/ with "Invalid argument" errors | |
run: "npm run --fast test" | |
validate: | |
name: "CI - Validate Job" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout Repository" | |
uses: "actions/checkout@v4" | |
- name: "Set up Python" | |
uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.13" | |
- name: "Install Python Dependencies" | |
run: "python -u -m pip install --upgrade pip && pip install jsonschema xmlschema" | |
- name: "Validate changelog.xml" | |
run: "python -u -c 'import xmlschema; xmlschema.XMLSchema(\"schemas/changes-1.0.0.xsd\").validate(\"changelog.xml\")'" | |
- name: "Validate JSON files" | |
run: "python -u tools/validateJsonFiles.py" | |
analyzeCodeQl: | |
name: "CI - CodeQL Job" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout Repository" | |
uses: "actions/checkout@v4" | |
- name: "Initialize CodeQL" | |
uses: "github/codeql-action/init@v3" | |
with: | |
languages: "javascript,python" | |
- name: "Autobuild" | |
uses: "github/codeql-action/autobuild@v3" | |
- name: "Perform CodeQL Analysis" | |
uses: "github/codeql-action/analyze@v3" | |
deployForVsCode: | |
name: "CI - Deploy for VS Code Job" | |
if: "${{ startsWith(github.ref, 'refs/tags/') }}" | |
needs: | |
- "buildForVsCode" | |
- "validate" | |
- "analyzeCodeQl" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout Repository" | |
uses: "actions/checkout@v4" | |
- name: "Set up Node.js" | |
uses: "actions/setup-node@v4" | |
with: | |
node-version: 22 | |
- name: "Install Node.js Dependencies" | |
run: "npm install && npm install -g @vscode/vsce ovsx" | |
- name: "Set up Python" | |
uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.13" | |
- name: "Install Python Dependencies" | |
run: "python -u -m pip install --upgrade pip && pip install semver" | |
- name: "Set VSCODE_LTEX_VERSION" | |
run: "echo \"VSCODE_LTEX_VERSION=$(python -u -c \"import json; print(json.load(open('package.json', 'r'))['version'], end='')\")\" >> $GITHUB_ENV" | |
- name: "Check VSCODE_LTEX_VERSION" | |
run: "if [[ -z \"$VSCODE_LTEX_VERSION\" ]]; then echo 'Error: VSCODE_LTEX_VERSION not set!'; (exit 1); fi; echo \"VSCODE_LTEX_VERSION set to '$VSCODE_LTEX_VERSION'\"" | |
- name: "Set VSCODE_LTEX_IS_PRERELEASE" | |
run: "if [[ -z \"$VSCODE_LTEX_VERSION\" ]]; then echo 'Error: VSCODE_LTEX_VERSION not set!'; (exit 1); fi; echo \"VSCODE_LTEX_IS_PRERELEASE=$(python -u -c \"import semver; print('true' if semver.VersionInfo.parse('$VSCODE_LTEX_VERSION').prerelease is not None else 'false', end='')\")\" >> $GITHUB_ENV" | |
- name: "Check VSCODE_LTEX_IS_PRERELEASE" | |
run: "if [[ -z \"$VSCODE_LTEX_IS_PRERELEASE\" ]]; then echo 'Error: VSCODE_LTEX_IS_PRERELEASE not set!'; (exit 1); fi; echo \"VSCODE_LTEX_IS_PRERELEASE set to '$VSCODE_LTEX_IS_PRERELEASE'\"" | |
- name: "Set VSCODE_LTEX_CHANGELOG" | |
run: "if [ \"$VSCODE_LTEX_IS_PRERELEASE\" = \"false\" ]; then echo \"VSCODE_LTEX_CHANGELOG<<EOF\" >> $GITHUB_ENV; python -u tools/convertChangelog.py --xml-file changelog.xml --version latest >> $GITHUB_ENV; echo \"EOF\" >> $GITHUB_ENV; else echo \"VSCODE_LTEX_CHANGELOG=This is a pre-release. Use at your own risk.\" >> $GITHUB_ENV; fi" | |
- name: "Build Package with vsce" | |
run: "vsce package" | |
- name: "Build Offline Packages" | |
env: | |
LTEX_GITHUB_OAUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
run: "python -u tools/createOfflinePackages.py" | |
- name: "Create GitHub Release" | |
uses: "softprops/action-gh-release@v2" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
prerelease: "${{ env.VSCODE_LTEX_IS_PRERELEASE }}" | |
body: "${{ env.VSCODE_LTEX_CHANGELOG }}" | |
files: "vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}*.vsix" | |
- name: "Publish Package on VS Marketplace" | |
if: "${{ env.VSCODE_LTEX_IS_PRERELEASE == 'false' }}" | |
env: | |
VSCODE_LTEX_VSCE_TOKEN: "${{ secrets.VSCODE_LTEX_VSCE_TOKEN }}" | |
run: "vsce publish -p \"$VSCODE_LTEX_VSCE_TOKEN\"" | |
- name: "Publish Package on Open VSX" | |
if: "${{ env.VSCODE_LTEX_IS_PRERELEASE == 'false' }}" | |
env: | |
VSCODE_LTEX_OVSX_TOKEN: "${{ secrets.VSCODE_LTEX_OVSX_TOKEN }}" | |
run: "ovsx publish -p \"$VSCODE_LTEX_OVSX_TOKEN\"" |