Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 51 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,65 @@ jobs:
node-version: [18.x, 20.x]

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
path: src

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: src/package-lock.json

- name: Install dependencies
run: npm ci
- name: Install dependencies
working-directory: src
run: npm ci

- name: Run linting
run: npm run lint
- name: Run linting
working-directory: src
run: npm run lint

- name: Compile TypeScript
run: npm run compile
- name: Compile TypeScript
working-directory: src
run: npm run compile

- name: Run tests
uses: coactions/setup-xvfb@v1
with:
run: npm test
- name: Run tests
uses: coactions/setup-xvfb@v1
with:
run: npm test
working-directory: src

package:
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Package extension
run: |
npm install -g @vscode/vsce
vsce package

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension
path: '*.vsix'
- name: Checkout code
uses: actions/checkout@v4
with:
path: src

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: npm
cache-dependency-path: src/package-lock.json

- name: Install dependencies
working-directory: src
run: npm ci

- name: Package extension
working-directory: src
run: |
npm install -g @vscode/vsce
vsce package

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension
path: src/*.vsix
7 changes: 6 additions & 1 deletion .vscode-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});

launchArgs: [
'--user-data-dir',
'/tmp/vscode-test'
]
});
Loading