Skip to content

Enhance trace server argument parsing to allow system property values containing whitespace to be passed to JVM #95

Enhance trace server argument parsing to allow system property values containing whitespace to be passed to JVM

Enhance trace server argument parsing to allow system property values containing whitespace to be passed to JVM #95

Workflow file for this run

name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types:
- published
jobs:
build-test:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn --frozen-lockfile
- name: Run tests
uses: coactions/setup-xvfb@v1
with:
run: yarn test
- name: Package as VSCode Extension
run: yarn vsce:package
# Save the extension .vsix file for potential publishing
# in later step (if appropriate)
- uses: actions/upload-artifact@v4
with:
name: extension
path: vscode-trace-server-*.vsix
code-lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# ESLint and Prettier must be in `package.json`
- run: yarn --frozen-lockfile --ignore-scripts
- name: Run lint
run: yarn lint
- name: Run format check
run: yarn format:check
publish-oxsv:
# https://open-vsx.org/
name: Publish extension to public Open VSX Registry
runs-on: ${{ matrix.os }}
needs:
- build-test
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18]
# Only execute when the trigger was a tag (new release)
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/vscode-trace-server'
steps:
- uses: actions/checkout@v4
# restore extension from the built-test job
- uses: actions/download-artifact@v4
with:
name: extension
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-scripts
- name: Publish extension
run: |
ls -al vscode-trace-server-*.vsix
npx ovsx publish vscode-trace-server-*.vsix
env:
# have ovsx consume the PAT from environment - if it's not handled explicitly
# in the workflow, less risk to leak it
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}
publish-vs-marketplace:
# https://marketplace.visualstudio.com/
name: Publish extension to Visual Studio Marketplace
runs-on: ${{ matrix.os }}
needs:
- build-test
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18]
# Only execute when the trigger was a tag (new release)
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/vscode-trace-server'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: extension
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile --ignore-scripts
- name: Publish extension
run: |
ls -al vscode-trace-server-*.vsix
npx vsce publish -i vscode-trace-server-*.vsix --skip-duplicate
env:
# have vsce consume the PAT from environment - if it's not handled explicitly
# in the workflow, less risk to leak it
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}