Skip to content

Commit

Permalink
Use Primula for code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hattya committed Apr 13, 2024
1 parent 6980d44 commit 4b0cac2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
fail-fast: false
name: Vim ${{ matrix.vim_version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
env:
PROFILE: profile.txt
timeout-minutes: 10
steps:
- name: Checkout code
Expand All @@ -58,18 +56,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install covimerage
- name: Install Primula
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U covimerage
python -m pip install -U pip
python -m pip install -U primula
- name: Test
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
run: ./vim-themis/bin/themis --reporter spec
- name: Generate XML coverage report
run: |
covimerage write_coverage ${{ env.PROFILE }}
covimerage xml
run: primula run ./vim-themis/bin/themis --reporter spec
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.html
*.sw?
.coverage_*
.coverage
profile.txt
tags
16 changes: 3 additions & 13 deletions Asterfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
var os = require('os');
var path = require('path');
var vimscript = require('language/vimscript');
var themis = vimscript.themis;
var covimerage = vimscript.covimerage;
var primula = vimscript.primula;
var rst2html = require('language/restructuredtext').rst2html;

var title = 'Aster ☆ ' + path.basename(os.getwd());
Expand All @@ -11,17 +10,8 @@ aster.title(title);

// vim
aster.watch(/.+\.(?:vim|vimspec|themisrc)$/, function() {
var prof = 'profile.txt';
var cover = os.whence('covimerage');
if (cover) {
os.setenv('PROFILE', prof);
}

themis('--reporter', 'dot');
if (cover) {
covimerage.write_coverage(prof);
covimerage.report();
}
primula.run('themis', '--reporter', 'dot');
primula.report('-m');
});

// rst
Expand Down

0 comments on commit 4b0cac2

Please sign in to comment.