generated from hasundue/template-deno
-
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (45 loc) · 1.17 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test
on:
pull_request:
branches:
- main
paths-ignore:
- '**.md'
workflow_call:
workflow_dispatch:
jobs:
test:
name: Test
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.37.2 # @denopendabot denoland/deno
- name: Format
run: deno fmt --check
- name: Lint
run: deno lint
- name: Test
if: ${{ matrix.os != 'ubuntu-latest' }}
run: deno task test
- name: Test with coverage analysis
if: ${{ matrix.os == 'ubuntu-latest' }}
run: deno task test --coverage=./coverage
- name: Create coverage report
if: ${{ matrix.os == 'ubuntu-latest' }}
run: deno coverage ./coverage --lcov > ./coverage.lcov
- name: Upload to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
file: ./coverage.lcov
fail_ci_if_error: false