Skip to content

Commit

Permalink
[workflows] add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
shizunge committed Jan 31, 2024
1 parent fcd8d8d commit 46ebde6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Coverage

on:
push:
paths:
- 'src/*'
- 'tests/*'
workflow_dispatch:

jobs:
coverage:
name: Run tests coverage
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Install shellspec
run: |
mkdir -p ~/shellspec
cd ~/shellspec
git clone https://github.com/shellspec/shellspec.git
ln -s ~/shellspec/shellspec/shellspec /usr/local/bin/shellspec
echo -n "shellspec version: "
shellspec --version
- name: Install kcov
run: |
apt install -y kcov
- name: Checkout Code
uses: actions/checkout@v4
- name: Run tests
run: |
bash shellspec --kcov
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage

0 comments on commit 46ebde6

Please sign in to comment.