diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7299500..0b17910 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,9 @@ on: branches: [main] jobs: - run: - name: Upload vsix package + test: strategy: + fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} @@ -20,14 +20,7 @@ jobs: node-version: latest - name: npm ci run: npm ci - - name: npm run vscode:prepublish - run: npm run vscode:prepublish - - name: npm test - run: npm test - - name: build vsix package - run: npm run package - - name: upload vsix package - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v4 - with: - path: vscode-system-verilog-*.vsix + - name: npm lint + run: npm run lint + - name: npm test-headless + run: npm run test-headless \ No newline at end of file diff --git a/.github/workflows/publish-marketplace.yml b/.github/workflows/publish-marketplace.yml index a9302f8..7c22c8e 100644 --- a/.github/workflows/publish-marketplace.yml +++ b/.github/workflows/publish-marketplace.yml @@ -1,7 +1,9 @@ on: - push: - tags: - - "*" + workflow_dispatch: + inputs: + kind: + description: "Update kind (major, minor, patch)" + default: 'patch' name: Publish extension to marketplace jobs: @@ -11,14 +13,11 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: latest + node-version: 20 - run: npm ci - # - name: Publish to Open VSX Registry - # uses: HaaLeo/publish-vscode-extension@v1 - # with: - # pat: ${{ secrets.OPEN_VSX_TOKEN }} + - run: npm install -g @vscode/vsce - name: Publish to Visual Studio Marketplace - uses: HaaLeo/publish-vscode-extension@v1 - with: - pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} - registryUrl: https://marketplace.visualstudio.com \ No newline at end of file + run: vsce publish ${{ github.event.inputs.kind }} --pat ${{ secrets.VS_MARKETPLACE_TOKEN }} + # - run: npm install -g ovsx + # - name: Publish to Open Vsix + # run: npx ovsx publish -p ${{ secrets.OPEN_VSX_TOKEN }} diff --git a/src/test/index.ts b/src/test/index.ts index 3ad9269..3e0bec4 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -1,6 +1,6 @@ import * as path from 'path' -import * as Mocha from 'mocha' -import * as glob from 'glob' +import glob from 'glob' +import Mocha from 'mocha' export function run(): Promise { // Create the mocha test @@ -11,7 +11,7 @@ export function run(): Promise { const testsRoot = path.resolve(__dirname, '..') return new Promise((c, e) => { - glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { + glob('**/**.test.js', { cwd: testsRoot }, (err: Error | null, files: string[]) => { if (err) { return e(err) }