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
32 changes: 29 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,35 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Lint
run: npm run lint
- name: Compile TypeScript
- name: Compile Extension
run: npm run compile
- name: Compile Integration Tests
run: npm run compile:tests
- name: Run unit tests
run: npm run test:unit
- name: Run extension tests
run: xvfb-run -a npm test
- name: Generate unit coverage reports
run: npm run coverage:unit
- name: Run integration tests
run: xvfb-run -a npm run test:integration
- name: Generate integration coverage reports
run: xvfb-run -a npm run coverage:integration
- name: List coverage files
run: |
echo "Unit coverage files:"
ls -l ./coverage/unit
echo "Integration coverage files:"
ls -l ./coverage/integration
- name: Upload unit coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/unit/lcov.info
flags: unit
disable_search: true
- name: Upload integration coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/integration/lcov.info
flags: integration
disable_search: true
15 changes: 2 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- master
permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -25,16 +22,8 @@ jobs:
- name: List packaged files
run: npx vsce ls

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Version bump
run: |
npm version patch
git push
git push --tags
- name: Update version
run: npm version 0.0.${{ github.run_number }} --no-git-tag-version

- name: Publish to VS Code Marketplace
run: npx vsce publish patch
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist
node_modules
.vscode-test/
*.vsix
coverage
*.log
26 changes: 24 additions & 2 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
import { defineConfig } from '@vscode/test-cli';
import { defineConfig } from "@vscode/test-cli";
import * as fs from "fs/promises";
import * as path from "path";
import * as os from "os";
import simpleGit from "simple-git";

const fixturePath = path.join(os.tmpdir(), "gops-integration-test-workspace");

/** Initialise a minimal git repo so `GitService` (extension activate) finds a workspace. */
async function prepareWorkspace() {
await fs.rm(fixturePath, { recursive: true, force: true }).catch(() => {});
await fs.mkdir(fixturePath, { recursive: true });
const git = simpleGit(fixturePath);
await git.init();
await git.addConfig("user.email", "test@example.com");
await git.addConfig("user.name", "Test User");
await fs.writeFile(path.join(fixturePath, "README.md"), "# Test\n");
await git.add("README.md");
await git.commit("Initial commit");
}

await prepareWorkspace();

export default defineConfig({
files: 'out/test/**/*.test.js',
files: "out/test/integration/**/*.test.js",
workspaceFolder: fixturePath,
});
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Git Operations - Visual Git Toolkit for VS Code

[![CI Builds](https://github.com/thedev-codeman/gops/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/thedev-codeman/gops/actions/workflows/ci.yml)

[![Unit Coverage](https://codecov.io/gh/codemanxdev/gops/branch/develop/graph/badge.svg?flag=unit)](https://codecov.io/gh/codemanxdev/gops)

[![Integration Coverage](https://codecov.io/gh/codemanxdev/gops/branch/develop/graph/badge.svg?flag=integration)](https://codecov.io/gh/codemanxdev/gops)

## Features

### Tree View
Expand Down
Loading
Loading