-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (57 loc) · 1.73 KB
/
ci.yml
File metadata and controls
57 lines (57 loc) · 1.73 KB
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
name: CI
on: [push, pull_request]
jobs:
build:
name: test deno ${{ matrix.deno }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
deno: [v1.x, canary]
fail-fast: true
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup deno
uses: denoland/setup-deno@main
with:
deno-version: ${{ matrix.deno }}
- name: Check formatting
if: matrix.os == 'ubuntu-latest'
run: deno fmt --check
- name: Check linting
if: matrix.os == 'ubuntu-latest'
run: deno lint
- name: Run tests
run: deno test --coverage=cov
- name: Run tests unstable
run: deno test --unstable
- name: Generate lcov
if: |
matrix.os == 'ubuntu-latest' &&
matrix.deno == 'v1.x'
run: deno coverage --lcov cov > cov.lcov
- name: Upload coverage
if: |
matrix.os == 'ubuntu-latest' &&
matrix.deno == 'v1.x'
uses: codecov/codecov-action@v1
with:
files: cov.lcov
- name: Release info
if: |
github.repository == 'udibo/oauth2_server' &&
matrix.os == 'ubuntu-latest' &&
matrix.deno == 'v1.x' &&
startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
if: env.RELEASE_VERSION != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true