-
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (57 loc) · 1.87 KB
/
master.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Master CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build-test:
name: Quality Gate
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Deno v2.x
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Setup LCOV
run: sudo apt install -y lcov
- name: Verify formatting
run: deno task fmt
- name: Run linter
run: deno lint
- name: Run tests and coverage
run: deno task cover
- name: Fix LCOV output for SonarCloud
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage/report.lcov
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
test-matrix:
name: Test Matrix - Deno ${{ matrix.deno-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
deno-version: [v1.46.3, v2.0.0]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Setup Deno ${{ matrix.deno-version }}
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno-version }}
- name: Run tests (Deno v1)
if: "contains(matrix.deno-version, 'v1')"
run: deno task test-v1
- name: Run tests (Deno v2)
if: "contains(matrix.deno-version, 'v2')"
run: deno task test