-
Notifications
You must be signed in to change notification settings - Fork 1.4k
43 lines (39 loc) · 1.17 KB
/
test-cockroachdb.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: test-cockroachdb
on:
push:
paths:
- databases/cockroachdb/**
branches:
- latest
- dev
- patch-dev
pull_request:
paths:
- databases/cockroachdb/**
env:
CI: 1
PRISMA_TELEMETRY_INFORMATION: 'prisma-examples test-cockroachdb.yaml'
jobs:
test:
defaults:
run:
working-directory: databases/cockroachdb
runs-on: ubuntu-latest
env:
DATABASE_URL: postgresql://[email protected]:26257/prisma?sslmode=disable
steps:
- uses: actions/checkout@v4
- name: Start a single CockroachDB instance with Docker
env:
COCKROACHDB_DOCKER_TAG: 'cockroachdb/cockroach:latest-v21.2'
run: |
docker pull $COCKROACHDB_DOCKER_TAG
docker run -d --name roach --hostname roach -p 26257:26257 -p 8080:8080 -v "${{ github.workspace }}:/app" $COCKROACHDB_DOCKER_TAG start-single-node --insecure
sudo apt update && sudo apt install wait-for-it -y
wait-for-it -h localhost -p 26257
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install
- run: npx prisma migrate dev --name "init"
- run: npm run test