issue-19 #4
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
Test: | |
# defaults: | |
# run: | |
# working-directory: packages/usage | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: | |
- 20.x | |
os: | |
- ubuntu-latest | |
# - windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{matrix.node-version}} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2.0.1 | |
with: | |
version: 9.4.0 | |
- uses: actions/cache@v2 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Install dependencies | |
run: pnpm i --no-frozen-lockfile | |
- name: Build prisma-ts-select | |
working-directory: ./packages/prisma-ts-select | |
run: pnpm exec tsup | |
- name: Install prisma-ts-select dependency | |
working-directory: ./packages/usage | |
run: pnpm i --no-frozen-lockfile | |
- name: Set Up Prisma | |
working-directory: ./packages/usage | |
run: pnpm exec prisma generate | |
- name: Set Up Prisma DB | |
working-directory: ./packages/usage | |
run: pnpm exec prisma db push | |
- name: Test TS 🧪 | |
working-directory: ./packages/usage | |
run: pnpm run test:ts | |
- name: Run Tests 🧪 | |
working-directory: ./packages/usage | |
run: pnpm run test | |
# Publish: | |
# runs-on: ubuntu-latest | |
# needs: | |
# - Test | |
# if: ${{ github.ref == 'refs/heads/main' }} | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Use Node.js | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: 16.x | |
# registry-url: https://registry.npmjs.org | |
# - uses: actions/cache@v2 | |
# with: | |
# path: "**/node_modules" | |
# key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# - name: Install dependencies | |
# run: pnpm i --frozen-lockfile | |
# - name: Publish 🚀 | |
# working-directory: ./packages/prisma-ts-select | |
# run: npx semantic-release | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |