fix: fix release error #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_call: | |
| 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: Install lcov | |
| run: sudo apt-get update && sudo apt-get install -y lcov | |
| # - name: Run tests with coverage | |
| # run: | | |
| # pipenv run pytest --cov --cov-report=lcov | |
| # # bashcov ./commit_changes_test.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 }} |