-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
63 lines (57 loc) · 1.7 KB
/
.gitlab-ci.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
55
56
57
58
59
60
61
62
63
image: mcr.microsoft.com/dotnet/sdk:5.0-alpine
variables:
OBJECTS_DIRECTORY: "obj"
NUGET_PACKAGES_DIRECTORY: ".nuget"
SOURCE_CODE_PATH: "./src/"
MODE: "postgres"
PG_MODE: "primary"
PG_USER: "The12thPlayerUser"
PG_PASSWORD: "The12thPlayerPassword"
PG_DATABASE: "The12thPlayerTest"
PG_PRIMARY_USER: "PrimaryUser"
PG_PRIMARY_PASSWORD: "PrimaryPassword"
PG_ROOT_PASSWORD: "postgres"
PGHOST: "/tmp"
PG_PRIMARY_PORT: 5432
COCKROACH_HOST: "cockroach-test:26257"
COCKROACH_INSECURE: "true"
DATABASE_NAME: "The12thPlayerTest"
DATABASE_USER: "The12thPlayerUser"
ALLOW_EMPTY_PASSWORD: "yes"
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- $SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json
- $SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*
- $SOURCE_CODE_PATH$NUGET_PACKAGES_DIRECTORY
policy: pull-push
stages:
- Build
- Test
before_script:
- cd $SOURCE_CODE_PATH
- dotnet restore The12thPlayer.sln --packages $NUGET_PACKAGES_DIRECTORY
build:
stage: Build
script:
- dotnet build The12thPlayer.sln --no-restore
test:
stage: Test
variables:
FF_NETWORK_PER_BUILD: "true"
ASPNETCORE_ENVIRONMENT: "TestingCI"
DOTNET_ENVIRONMENT: "TestingCI"
services:
- name: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.4-4.7.3
alias: postgres-test
- name: cockroachdb/cockroach:v21.2.3
alias: cockroach-test
command: ["start-single-node", "--insecure"]
- name: chekhenkho/cockroachdb-init:latest
alias: cockroach-init
- name: masstransit/rabbitmq:3.9.7
alias: rabbit-test
- name: bitnami/redis:6.2.6
alias: redis-test
script:
- dotnet test The12thPlayer.sln --no-restore --filter FullyQualifiedName\!~FileHostingGateway