Files
discordeno/.github/workflows/test.yml
Jonathan Ho b53da4b578 CI: Setup ci (#2669)
* ci: fix test

* ci: fix typo

* fix: turbo script
2022-12-02 00:28:44 +08:00

79 lines
2.2 KiB
YAML

name: Test
on:
pull_request:
push:
jobs:
format-test:
name: Format Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Check Formatting
run: yarn lint
type-test:
name: Type Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Check Formatting
run: yarn test-types
#integration-test:
# name: Integration Test
# runs-on: ubuntu-latest
# concurrency: integration-test
# steps:
# - uses: actions/checkout@v3
# - uses: denoland/setup-deno@main
# with:
# deno-version: v1.x
# - name: Run integration
# # if: ${{ github.actor == 'Skillz4Killz' || github.actor == 'itohatweb' }}
# run: deno test --coverage=coverage -A tests/
# env:
# DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
# UNIT_TEST_GUILD_ID: ${{ secrets.UNIT_TEST_GUILD_ID }}
# TEST_ENV: INTEGRATION
# PROXY_REST_SECRET: ${{ secrets.PROXY_REST_SECRET }}
# PROXY_REST_URL: ${{ secrets.PROXY_REST_URL }}
# - name: Create coverage report
# run: deno coverage --exclude=tests ./coverage --lcov > coverage.lcov
# - name: Collect and upload the coverage report
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage.lcov
# flags: integration
#unit-test:
# name: Unit Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: denoland/setup-deno@main
# with:
# deno-version: v1.x
# - name: Run integration
# run: deno test --coverage=coverage --parallel -A tests/
# env:
# TEST_ENV: UNIT
# - name: Create coverage report
# run: deno coverage --exclude=tests ./coverage --lcov > coverage.lcov
# - name: Collect and upload the coverage report
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage.lcov
# flags: unit