Skip to content

Improve validation for gameId in createGame (#173) #240

Improve validation for gameId in createGame (#173)

Improve validation for gameId in createGame (#173) #240

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npx prettier --check .
lint_test:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm run lint
- run: npm test
functions:
name: Cloud Functions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
working-directory: functions
- run: npm run build
working-directory: functions
preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: [format, lint_test, functions]
if:
success() && github.event_name == 'push' && github.repository_owner ==
'ekzhang'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm ci
working-directory: functions
- run: npm run build:preview
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy -P staging --only database,functions,hosting,storage
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}