-
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (125 loc) · 3.6 KB
/
test.yml
File metadata and controls
131 lines (125 loc) · 3.6 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: nixbuild/nix-quick-install-action@v34
- run: nix develop -c deno task check
- run: nix develop -c deno lint
- run: |
nix develop -c deno fmt
git diff --exit-code
test:
runs-on: ubuntu-latest
services:
echo-http:
image: ghcr.io/probitas-test/echo-http:latest
ports:
- 8080:80
echo-grpc:
image: ghcr.io/probitas-test/echo-grpc:latest
ports:
- 50051:50051
echo-connectrpc:
image: ghcr.io/probitas-test/echo-connectrpc:latest
ports:
- 8090:8080
echo-graphql:
image: ghcr.io/probitas-test/echo-graphql:latest
ports:
- 8100:8080
postgres:
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpassword
options: >-
--health-cmd "pg_isready -U testuser -d testdb"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: testdb
MYSQL_USER: testuser
MYSQL_PASSWORD: testpassword
options: >-
--health-cmd "mysqladmin ping -h localhost -u root -prootpassword"
--health-interval 5s
--health-timeout 5s
--health-retries 10
denokv:
image: ghcr.io/denoland/denokv
ports:
- 4512:4512
env:
DENO_KV_SQLITE_PATH: ":memory:"
DENO_KV_ACCESS_TOKEN: testtoken1234
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 5s
--health-retries 10
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
options: >-
--health-cmd "rabbitmq-diagnostics check_port_connectivity"
--health-interval 10s
--health-timeout 10s
--health-retries 10
localstack:
image: localstack/localstack:latest
ports:
- 4566:4566
env:
SERVICES: sqs
DEBUG: 0
options: >-
--health-cmd "curl -f http://localhost:4566/_localstack/health || exit 1"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DENO_KV_ACCESS_TOKEN: testtoken1234
steps:
# MongoDB is started via action instead of services because:
# - GitHub Actions services don't support custom command options
# - Transactions require replica set mode (--replSet flag)
# - supercharge/mongodb-github-action handles replica set initialization
- uses: supercharge/mongodb-github-action@1.12.0
with:
mongodb-version: "7.0"
mongodb-replica-set: rs0
- uses: actions/checkout@v6
- uses: nixbuild/nix-quick-install-action@v34
- run: nix develop -c deno task test:coverage
timeout-minutes: 5
- run: nix develop -c deno task coverage --lcov > coverage.lcov
timeout-minutes: 5
- uses: codecov/codecov-action@v5
with:
files: ./coverage.lcov
slug: probitas-test/probitas-packages