-
Notifications
You must be signed in to change notification settings - Fork 1.5k
54 lines (49 loc) · 1.59 KB
/
test.yml
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
44
45
46
47
48
49
50
51
52
53
54
name: Node.js CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
# container:
# image: 'node:12'
services:
postgres:
image: postgres:10.3
env:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432/tcp
# mysql:8.0 would not work as we use `mariadb` node lib and it doesn't support the latest default password algorithm
# https://stackoverflow.com/questions/60902904/how-to-pass-mysql-native-password-to-mysql-service-in-github-actions
mysql:
image: bitnami/mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: tests
MYSQL_USER: prisma
MYSQL_PASSWORD: prisma
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: "12"
- run: bash src/.buildkite/test/run.sh
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}
TEST_POSTGRES_URI: postgres://prisma:prisma@localhost:${{ job.services.postgres.ports[5432] }}/postgres
TEST_MYSQL_URI: mysql://prisma:prisma@localhost:${{ job.services.mysql.ports[3306] }}/tests