Move prisma deploy to runtime #230
This file contains hidden or 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: Jest | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| DATABASE_URL: 'mysql://test:test@localhost:3306/test' | |
| CONFIG_DOCKER_HOST: '///var/run/docker.sock' | |
| DEBUG: 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Check dev branch | |
| id: check_branch | |
| run: | | |
| if [[ "${{ github.head_ref }}" == "dev" ]]; then | |
| echo "This PR is from the dev branch. Exiting..." | |
| exit 0 | |
| fi | |
| - name: Shutdown default MySQL | |
| run: sudo service mysql stop | |
| - name: Setup MySQL | |
| uses: mirromutth/[email protected] | |
| with: | |
| mysql database: 'test' | |
| mysql user: 'test' | |
| mysql password: 'test' | |
| - name: Use Node.js 14.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Prisma generate | |
| run: npx prisma generate | |
| - name: Prisma migrate | |
| run: npx prisma migrate deploy | |
| - name: Run tests | |
| run: npm test | |
| - name: Publish Test Summary Results | |
| run: npx github-actions-ctrf ctrf/ctrf-report.json | |
| if: always() |