Skip to content

Commit

Permalink
ci changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewNolte committed May 11, 2024
1 parent 9d01fae commit e87a2a7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 28 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
23 changes: 11 additions & 12 deletions .github/workflows/publish-marketplace.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
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 }}
6 changes: 3 additions & 3 deletions src/test/index.ts
Original file line number Diff line number Diff line change
@@ -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<void> {
// Create the mocha test
Expand All @@ -11,7 +11,7 @@ export function run(): Promise<void> {
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)
}
Expand Down

0 comments on commit e87a2a7

Please sign in to comment.