48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: main
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
env:
|
|
TEST_BOT_TOKEN: ${{ secrets.TEST_BOT_TOKEN }}
|
|
TEST_CHANNEL_ID: ${{ secrets.TEST_CHANNEL_ID }}
|
|
TEST_GUILD_ID: ${{ secrets.TEST_GUILD_ID }}
|
|
TEST_CATEGORY_ID: ${{ secrets.TEST_CATEGORY_ID }}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-commands:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
command:
|
|
# if tests run in the same process, it dies,
|
|
# so we test them separate
|
|
- name: test
|
|
run: pnpm test
|
|
- name: test website
|
|
run: pnpm -C packages/website test
|
|
- name: build
|
|
run: pnpm --recursive run build
|
|
- name: lint
|
|
run: pnpm run lint
|
|
- name: typecheck
|
|
run: pnpm --recursive run typecheck
|
|
name: ${{ matrix.command.name }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
# https://github.com/actions/setup-node#supported-version-syntax
|
|
node-version: "16"
|
|
cache: "pnpm"
|
|
- run: npm i -g pnpm@7.5.0
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: ${{ matrix.command.run }}
|