test: fix git commit test #9
This file contains 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: Test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
- '.github/workflows/test.yaml' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
Test: | |
if: github.repository == 'vnphanquang/githooks' # prevents this action from running on forks | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Lint | |
run: deno lint | |
- name: Run Tests | |
run: 'deno task ci:test' | |
- name: Generate --lcov coverage | |
run: 'deno task ci:coverage' | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
os: ${{ runner.os }} | |
files: ./coverage/lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} |