-
-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (61 loc) · 1.81 KB
/
ci.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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
timeout-minutes: 5
strategy:
matrix:
config:
- os: macOS-latest
kind: test
cov: false
- os: windows-latest
kind: test
cov: false
- os: ubuntu-latest
kind: test
cov: true
- os: ubuntu-latest
kind: lint
cov: false
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install deno
uses: denolib/setup-deno@master
with:
deno-version: 1.8.2
- name: Check lint
if: matrix.config.kind == 'lint'
run: deno lint --unstable
- name: Check formatting
if: matrix.config.kind == 'lint'
run: deno fmt --check --ignore='./README.md,./docs'
- name: Test ${{matrix.config.cov && '(with coverage)' || ''}}
if: matrix.config.kind == 'test'
run: deno test ${{matrix.config.cov && '--coverage=./cov --unstable' || ''}}
- name: Generate lcov
if: matrix.config.cov
run: deno coverage --exclude=test --unstable --lcov ./cov > cov.lcov
- name: Upload lcov
if: matrix.config.cov
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./cov.lcov
- name: Release
uses: softprops/action-gh-release@v1
if: |
matrix.config.kind == 'test' &&
github.repository == 'littletof/prettyBenching' &&
startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true