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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
pull_request:
branches:
- main
- 'v*.*.*'

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
ci:
name: test and package
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'

- run: npm ci

- name: Run tests
run: npm test

- name: Build VSIX
id: build
run: |
set -euo pipefail
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
VSIX="${PACKAGE_NAME}-${PACKAGE_VERSION}.vsix"
npm run package
if [ ! -f "$VSIX" ]; then
echo "::error::Build succeeded but expected VSIX '$VSIX' was not produced"
ls -1 *.vsix 2>/dev/null || true
exit 1
fi
echo "Built $VSIX"
13 changes: 11 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import tseslint from 'typescript-eslint';
import unusedImports from 'eslint-plugin-unused-imports';
import simpleImportSort from 'eslint-plugin-simple-import-sort';

export default [
export default tseslint.config(
{
ignores: [
'out/',
Expand All @@ -23,6 +23,15 @@ export default [
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
// Jest mocks (and any other JS under src/) are not in the TS program.
{
files: ['**/*.js'],
extends: [tseslint.configs.disableTypeChecked],
languageOptions: {
sourceType: 'commonjs',
globals: globals.node,
},
},
{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
Expand Down Expand Up @@ -135,4 +144,4 @@ export default [
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
];
);
Loading
Loading