Skip to content

Merge branch 'main' of github.com:ImBIOS/bun-node #5

Merge branch 'main' of github.com:ImBIOS/bun-node

Merge branch 'main' of github.com:ImBIOS/bun-node #5

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- "**/coverage.svg"
pull_request:
branches:
- main
paths-ignore:
- "**/coverage.svg"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# - name: Set up bashcov
# uses: infertux/bashcov/.github/actions/set-up-bashcov@master
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pipenv"
- name: Install lcov
run: sudo apt-get update && sudo apt-get install -y lcov
- name: Install dependencies
run: |
pip install pipenv
pipenv install --dev
- name: Run tests with coverage
run: |
pipenv run pytest --cov --cov-report=lcov
# bashcov ./test-commit-changes.sh
# ./merge_lcov.sh src merged.lcov
- name: Coverage Badge
uses: ImBIOS/lcov-coverage-badge@v1
with:
file: ./coverage.lcov
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
with:
files: "coverage.svg"
- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "ci: update coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: ${{ github.ref }}