mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 00:10:07 +00:00
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
name: Test
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [labeled]
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
deno: ["v1.x"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: denolib/setup-deno@v2
|
|
with:
|
|
deno-version: ${{ matrix.deno }}
|
|
- name: Cache dependencies
|
|
run: deno cache --no-check mod.ts
|
|
- name: Run test script for Devs
|
|
if: ${{ github.actor == 'Skillz4Killz' || github.actor == 'itohatweb' || github.actor == 'ayntee' }}
|
|
run: deno test --unstable --coverage=coverage -A --no-check tests/mod.ts
|
|
- name: Run test script for label
|
|
if: ${{ github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'run-tests' }}
|
|
run: deno test --unstable --coverage=coverage -A --no-check tests/mod.ts
|
|
- name: Create coverage report
|
|
run: deno --unstable coverage ./coverage --lcov > coverage.lcov # create coverage report
|
|
- name: Collect coverage
|
|
uses: codecov/codecov-action@v1.0.10 # upload the report on Codecov
|
|
with:
|
|
file: ./coverage.lcov
|
|
env:
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|