40 lines
763 B
YAML
40 lines
763 B
YAML
name: Test & Build
|
|
run-name: ${{ gitea.actor }} is testing & building
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- staging
|
|
- dev
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- staging
|
|
- dev
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Dependencies
|
|
run: npm i
|
|
|
|
- name: Reset and Push Database Migrations
|
|
run: |
|
|
echo "DATABASE_URL is ${DATABASE_URL::9}****"
|
|
npx prisma migrate reset --force
|
|
npx prisma db push
|
|
env:
|
|
DATABASE_URL: ${{ secrets.POSTGRESQL_CONN_STRING }}
|
|
|
|
- name: Build Dist
|
|
run: npm run build
|
|
|
|
- name: Run Tests
|
|
run: npm run test
|