diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..46279aa --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI for SQL Helper + +on: + pull_request: + branches: [ main ] + push: + branches: [ main ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + # 1️⃣ Traer el código + - name: Checkout repository + uses: actions/checkout@v3 + + # 2️⃣ Configurar Node.js + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + # 3️⃣ Instalar dependencias + - name: Install dependencies + run: npm install + + # 4️⃣ Linter + - name: Run ESLint + run: npm run lint + + # 5️⃣ Compilación + - name: Compile TypeScript + run: npm run compile + + # 6️⃣ Tests con vscode-test + - name: Run VS Code extension tests + run: xvfb-run -a npm test + + # 7️⃣ Package VSIX + - name: Package VSIX + run: | + npm install -g vsce + npx vsce package diff --git a/package.json b/package.json index e77517f..0a500ac 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "@vscode/test-electron": "^2.4.1", - "eslint": "^9.39.1", + "eslint": "^8.57.0", "glob": "^13.0.0", "mocha": "^11.7.5", "typescript": "^5.9.3",