Skip to content

Commit

Permalink
fix(cli): Add deno tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed Apr 1, 2024
1 parent 6182354 commit 2ea7ebb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Deno build

on:
push:
branches: [master]
tags: ['*']
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1.1.2
with:
deno-version: v1.x
- name: Collect coverage
run: deno task coverage
if: ${{ always() }}
- uses: codecov/codecov-action@v4
if: ${{ always() }}
with:
files: coverage.lcov
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ dist
!.yarn/versions
.*.sw[po]
.venv/
coverage
coverage.lcov
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
]
},
"tasks": {
"tests": "deno test --allow-read --allow-write cli/"
"tests": "deno test --allow-read --allow-write cli/",
"coverage": "deno test --allow-read --allow-write --coverage cli/ && deno coverage ./coverage --lcov > coverage.lcov"
}
}

0 comments on commit 2ea7ebb

Please sign in to comment.