chore: Minor code cleanup #416
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- .github/workflows/** | |
- prisma/** | |
- src/** | |
- tests/** | |
- package-lock.json | |
- package.json | |
- .dockerignore | |
- Dockerfile | |
- rollup.config.ts | |
- vitest.config.e2e.ts | |
- vitest.config.ts | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# Don't run integration tests more than once at a time | |
concurrency: | |
group: gamgee-tests | |
cancel-in-progress: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Use Node.js 20.10.x | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.10.x | |
- run: npm ci | |
- run: npm run build | |
- run: npm run test:src | |
env: | |
# TODO: Some way for users without a Google account to run other tests: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
integration: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Use Node.js 20.10.x (earliest version supported) | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.10.x | |
- run: npm ci | |
- run: npm run build --omit=dev | |
- run: npm run test:e2e | |
env: | |
CI: true | |
NODE_ENV: "test" | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
SOUNDCLOUD_API_KEY: ${{ secrets.SOUNDCLOUD_API_KEY }} | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
CORDE_TEST_TOKEN: ${{ secrets.CORDE_TEST_TOKEN }} | |
CORDE_BOT_ID: ${{ secrets.CORDE_BOT_ID }} | |
BOT_TEST_ID: ${{ secrets.BOT_TEST_ID }} | |
GUILD_ID: ${{ secrets.GUILD_ID }} | |
CHANNEL_ID: ${{ secrets.CHANNEL_ID }} | |
QUEUE_CHANNEL_ID: ${{ secrets.QUEUE_CHANNEL_ID }} | |
QUEUE_ADMIN_ROLE_ID: ${{ secrets.QUEUE_ADMIN_ROLE_ID }} | |
QUEUE_CREATOR_ROLE_ID: ${{ secrets.QUEUE_CREATOR_ROLE_ID }} | |
BOT_PREFIX: "?" |