Skip to content

fix(deps): update dependencies (non-major) #1100

fix(deps): update dependencies (non-major)

fix(deps): update dependencies (non-major) #1100

Workflow file for this run

name: Checks
on:
pull_request:
merge_group:
push:
branches: [main]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
lint-checks:
name: Check ESLint and Format
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build and lint
run: pnpm lint
type-checks:
name: Check Type
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Generate prisma types
run: pnpm generate:prisma
- name: Run Type Checks
run: pnpm typecheck
unit-test-check:
name: Run Test
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Generate Prisma client
run: pnpm prisma generate
- name: 'Test'
run: pnpm test:coverage
- name: 'Report Coverage'
if: github.event_name == 'pull_request'
uses: davelosert/vitest-coverage-report-action@v2
smoke-e2e-check:
name: Run Smoke Test
concurrency: smoke-test
timeout-minutes: 10
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
DATABASE_URL: 'file:./smoke.db'
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Generate Prisma client
run: pnpm migrate
- name: 'Smoke Test'
env:
BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
GUILD_ID: ${{ secrets.CI_GUILD_ID }}
MOD_CHANNEL_ID: ${{ secrets.CI_MOD_CHANNEL_ID }}
SMOKE_TESTER_BOT_TOKEN: ${{ secrets.CI_SMOKE_TESTER_BOT_TOKEN }}
run: pnpm test:smoke
docker-smoke:
name: Run Docker Smoke Test
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: bot
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Show Docker image history
run: docker history bot
- name: Create .data directory
run: cd smoke && mkdir -p .data && chmod a+rw .data
- name: Perform database migrations
run: cd smoke && docker compose run --rm bot npx prisma db push && test -f .data/bot.db
- name: Run smoke test
run: cd smoke && docker compose run --rm bot dist/index.js --smoke