diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0150a7..3db2b07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.vscode-test.mjs b/.vscode-test.mjs index b62ba25..2097458 100644 --- a/.vscode-test.mjs +++ b/.vscode-test.mjs @@ -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' + ] +}); \ No newline at end of file