Skip to content

Commit

Permalink
ci: unify test commit status check title
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav-simonik committed Dec 18, 2022
1 parent 7d4f297 commit bbcecf0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ jobs:

test-latest-prisma-without-database:
needs: [validate]
name: Test with latest Prisma - No DB
name: Test with latest Prisma
timeout-minutes: 20

strategy:
matrix:
os: ['macos-latest', 'windows-latest']
node-version: [14, 16]
database: ['not-available']

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

Expand Down Expand Up @@ -70,17 +71,18 @@ jobs:
- name: Test
run: yarn -s test:ci
env:
DATABASE_SETUP: not-available
DATABASE: ${{ matrix.database }}

test-latest-prisma-with-database:
needs: [validate]
name: Test with latest Prisma - DB
name: Test with latest Prisma
timeout-minutes: 20

strategy:
matrix:
os: ['ubuntu-latest']
node-version: [14, 16]
database: ['available']

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

Expand Down Expand Up @@ -110,24 +112,32 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile

- name: Set E2E DB Schema
- name: Set E2E DB Schema for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --github-env $env:GITHUB_ENV

- name: Set E2E DB Schema for other operating systems
if: ${{ matrix.os != 'windows-latest' }}
run: yarn -s ts-node scripts/get-e2e-db-schema --os ${{ matrix.os }} --node-version ${{ matrix.node-version }} --github-env $GITHUB_ENV

- name: Build
run: yarn -s build

- name: Test
run: yarn -s test:ci
env:
DATABASE: ${{ matrix.database }}

test-past-prisma-with-database:
needs: [validate]
name: Test with past Prisma - DB
name: Test with past Prisma
timeout-minutes: 20

strategy:
matrix:
os: ['ubuntu-latest']
node-version: [16]
database: ['available']
prisma-base-version: ['4.0']

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -171,3 +181,6 @@ jobs:
run: yarn -s add @prisma/generator-helper@${{ matrix.prisma-base-version }}
- name: Test
run: yarn -s test:ci
env:
DATABASE: ${{ matrix.database }}

2 changes: 1 addition & 1 deletion tests/e2e/kitchen-sink.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ it('A full-featured project type checks, generates expected GraphQL schema, and
/.*"prismaClientImportId": "@prisma\/client".*/
)

if (process.env.DATABASE_SETUP === 'not-available') {
if (process.env.DATABASE === 'not-available') {
d(`database not available, skipping runtime test`)
return
}
Expand Down

0 comments on commit bbcecf0

Please sign in to comment.