mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 16:30:08 +00:00
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "handlers/**"
|
|
- "helpers/**"
|
|
- "plugins/**"
|
|
- "rest/**"
|
|
- "testss/**"
|
|
- "transformers/**"
|
|
- "template/**"
|
|
- "types/**"
|
|
- "util/**"
|
|
- "gateway/**"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
deno: ["v1.x"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: git submodule update --init --recursive
|
|
- uses: denoland/setup-deno@main
|
|
with:
|
|
deno-version: ${{ matrix.deno }}
|
|
- name: Cache dependencies
|
|
run: deno cache mod.ts
|
|
- name: Cache Templates
|
|
run: deno cache template/beginner/mod.ts template/bigbot/src/bot/mod.ts template/bigbot/src/gateway/mod.ts template/bigbot/src/rest/mod.ts template/minimal/mod.ts
|
|
- name: Run test script for maintainers
|
|
if: ${{ github.actor == 'Skillz4Killz' || github.actor == 'itohatweb' }}
|
|
run: deno test --coverage=coverage -A testss/ --jobs
|
|
- name: Create coverage report
|
|
if: github.ref == 'refs/heads/main'
|
|
run: deno coverage --exclude=tests ./coverage --lcov > coverage.lcov
|
|
- name: Collect and upload the coverage report
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: codecov/codecov-action@v1.0.10
|
|
with:
|
|
file: ./coverage.lcov
|
|
env:
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
PROXY_REST_SECRET: ${{ secrets.PROXY_REST_SECRET }}
|
|
PROXY_REST_URL: ${{ secrets.PROXY_REST_URL }}
|