Skip to content

Commit

Permalink
chore(ci): split workflow files, add canary test's and generate code …
Browse files Browse the repository at this point in the history
…coverage (#9)
  • Loading branch information
c4spar authored Aug 28, 2021
1 parent 2b16240 commit da153f4
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
comment: false
codecov:
require_ci_to_pass: true
coverage:
status:
project: off
patch: off
ignore:
- examples
26 changes: 26 additions & 0 deletions .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint and Test

on:
schedule:
- cron: 0 0 * * *

jobs:
canary:
name: Canary
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
deno: [canary]
steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}

- name: Run tests
run: deno test --unstable --shuffle --allow-all --jobs 2
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Lint and Test
on: [push, pull_request]

jobs:
lint-and-test:
name: Lint and test source
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup repo
Expand All @@ -20,6 +20,3 @@ jobs:

- name: Run linter
run: deno lint --unstable

- name: Run tests
run: deno test --unstable --shuffle --allow-read --allow-env --allow-run --allow-write
33 changes: 33 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint and Test

on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
deno: [v1.x]
steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}

- name: Run tests
run: deno test --coverage=./cov --unstable --shuffle --allow-all --jobs 2

- name: Generate lcov
run: deno coverage --unstable --lcov ./cov > cov.lcov

- name: Upload coverage
uses: codecov/codecov-action@v2
with:
name: ${{ matrix.os }}-${{ matrix.deno }}
files: cov.lcov
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<a href="https://github.com/c4spar/deno-dzx/releases">
<img alt="Version" src="https://img.shields.io/github/v/release/c4spar/deno-dzx?logo=github&color=F86F00" />
</a>
<a href="https://codecov.io/gh/c4spar/deno-dzx">
<img src="https://codecov.io/gh/c4spar/deno-dzx/branch/main/graph/badge.svg"/>
</a>
<a href="https://github.com/c4spar/deno-dzx/issues">
<img alt="issues" src="https://img.shields.io/github/issues/c4spar/deno-dzx?label=issues&logo=github">
</a>
Expand Down

0 comments on commit da153f4

Please sign in to comment.