Skip to content

Commit

Permalink
add group categories to events (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoalzate authored Jul 17, 2024
1 parent fc5e6cd commit 468adcc
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 32 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ jobs:
name: Review formatting
timeout-minutes: 2
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v4
- name: Check out repository code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v3
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/deploy-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ env:
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- name: Checkout code
- name: Check out repository code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v3
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ env:
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- name: Checkout code
- name: Check out repository code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v3
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Run Version Bump Script
run: scripts/workflows/bump-version.sh "${{ join(github.event.pull_request.labels.*.name, ' ') }}"

Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ jobs:
name: Check linting
timeout-minutes: 2
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v4
- name: Check out repository code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v3
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ on:

jobs:
testing:
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]

# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: secretpassword
POSTGRES_USER: postgres
Expand All @@ -40,11 +38,11 @@ jobs:

- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v3
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions src/db/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { pgTable, timestamp, uuid, varchar, integer, boolean, jsonb } from 'driz
import { registrations } from './registrations';
import { cycles } from './cycles';
import { registrationFields } from './registration-fields';
import { groupCategories } from './group-categories';

export const events = pgTable('events', {
id: uuid('id').primaryKey().defaultRandom(),
Expand All @@ -22,6 +23,7 @@ export const eventsRelations = relations(events, ({ many }) => ({
registrations: many(registrations),
registrationFields: many(registrationFields),
cycles: many(cycles),
groupCategories: many(groupCategories),
}));

export type Event = typeof events.$inferSelect;

0 comments on commit 468adcc

Please sign in to comment.