Skip to content

Commit

Permalink
ci: unify trunk and pull request github actions workflow (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav-simonik authored Dec 18, 2022
1 parent 8bfd561 commit 6a73b25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Pull Request

on:
pull_request:

Expand Down Expand Up @@ -179,6 +180,7 @@ jobs:

- name: Install prisma packages
run: yarn -s add @prisma/generator-helper@${{ matrix.prisma-base-version }}

- name: Test
run: yarn -s test:ci
env:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
database: ['no-db']

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -108,7 +109,7 @@ jobs:
os: ['ubuntu-latest']
node-version: [16]
database: ['db']
prisma-client-version: ['4.0']
prisma-base-version: ['4.0']

runs-on: ${{ matrix.os }}

Expand All @@ -135,16 +136,20 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- run: yarn --frozen-lockfile
- name: Install dependencies
run: yarn --frozen-lockfile

- name: Set E2E DB Schema
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --prisma-client-version ${{ matrix.prisma-client-version }} --github-env $GITHUB_ENV
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --prisma-client-version ${{ matrix.prisma-base-version }} --github-env $GITHUB_ENV

- name: Build
run: yarn -s build

- name: Install Prisma Client version
run: yarn -s add @prisma/client@${{ matrix.prisma-client-version }}
- name: Install prisma dev packages
run: yarn -s add prisma@${{ matrix.prisma-base-version }} @prisma/client@${{ matrix.prisma-base-version }} @prisma/internals@${{ matrix.prisma-base-version }} --dev

- name: Install prisma packages
run: yarn -s add @prisma/generator-helper@${{ matrix.prisma-base-version }}

- name: Test
run: yarn -s test:ci
Expand Down

0 comments on commit 6a73b25

Please sign in to comment.