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

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: vscode-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
name: Type-check, corpus, and VSIX
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm

- name: Set up Java
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '11'

- name: Install dependencies
run: npm ci

- name: Type-check TypeScript
run: npm run check

- name: Compile extension
run: npm run compile

- name: Compare regression corpus
run: npm run test:corpus

- name: Package VSIX
run: npm run package:vsix

- name: Upload VSIX artifact
uses: actions/upload-artifact@v7
with:
name: test-smell-detector-vsix
path: test-smell-detector.vsix
if-no-files-found: error
retention-days: 14
5 changes: 5 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.vscode/**
.github/**
src/**
scripts/**
regression-corpus/**
.gitignore
tsconfig.json
package-lock.json
**/*.map
*.vsix
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,29 @@ If Java is installed under a different executable path, set
7. Review the detected smells in the **Problems** panel and the detailed run
summary in the **Test Smell Detector** Output panel.

## Automated checks

The GitHub Actions workflow runs for pull requests targeting `main`, pushes to
`main`, and manual workflow runs. It installs dependencies with `npm ci`,
type-checks and compiles the TypeScript extension, compares all regression
fixtures with their expected tsDetect results, and builds an installable VSIX.

The same checks can be run locally with Node.js 22 or newer and Java 11 or
newer:

```sh
npm ci
npm run check
npm run compile
npm run test:corpus
npm run package:vsix
```

`npm run test:corpus` expects the compiled adapter in `out/`, so run
`npm run compile` first. The packaging command creates
`test-smell-detector.vsix`. In GitHub Actions, that file is retained as the
`test-smell-detector-vsix` workflow artifact.

## Prototype limitations

- Analysis runs only when the command is invoked.
Expand Down
Loading
Loading