45 lines
1021 B
YAML
45 lines
1021 B
YAML
name: tests
|
|
|
|
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 }}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tests:
|
|
name: ${{ matrix.script }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
script:
|
|
- lint
|
|
- build
|
|
- test
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: pnpm
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: pnpm run ${{ matrix.script }}
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
if: always()
|