diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml new file mode 100644 index 000000000..02e026c64 --- /dev/null +++ b/.github/workflows/deno.yml @@ -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 diff --git a/.gitignore b/.gitignore index d48f05a4e..bd385a876 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ dist !.yarn/versions .*.sw[po] .venv/ +coverage +coverage.lcov diff --git a/deno.json b/deno.json index 54553baa5..dc08c1f6c 100644 --- a/deno.json +++ b/deno.json @@ -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" } }