tangled
alpha
login
or
join now
eldridge.cam
/
cartography
0
fork
atom
Trading card city builder game?
0
fork
atom
overview
issues
pulls
pipelines
add database for tests
eldridge.cam
1 month ago
5b05200b
2655f636
verified
This commit was signed with the committer's
known signature
.
eldridge.cam
SSH Key Fingerprint:
SHA256:MAgO4sya2MgvdgUjSGKAO0lQ9X2HQp1Jb+x/Tpeeims=
+30
-3
2 changed files
expand all
collapse all
unified
split
.github
workflows
rust.yml
sql.yml
+27
.github/workflows/rust.yml
···
2
2
3
3
on: push
4
4
5
5
+
env:
6
6
+
DATABASE_URL: "postgresql://postgres:postgres@localhost/cartography"
7
7
+
SHADOW_DATABASE_URL: "postgresql://postgres:postgres@localhost/shadow"
8
8
+
ROOT_DATABASE_URL: "postgresql://postgres:postgres@localhost/postgres"
9
9
+
SQLX_OFFLINE: "true"
10
10
+
5
11
jobs:
6
12
clippy:
7
13
name: clippy
···
79
85
test:
80
86
name: test
81
87
runs-on: ubuntu-latest
88
88
+
services:
89
89
+
postgres:
90
90
+
image: postgres:17
91
91
+
env:
92
92
+
POSTGRES_PASSWORD: postgres
93
93
+
POSTGRES_DB: cartography
94
94
+
ports:
95
95
+
- 5432:5432
96
96
+
options: >-
97
97
+
--health-cmd pg_isready
98
98
+
--health-interval 10s
99
99
+
--health-timeout 5s
100
100
+
--health-retries 5
82
101
steps:
83
102
- name: Checkout the source code
84
103
uses: actions/checkout@v4
104
104
+
- name: Install Node.js
105
105
+
uses: actions/setup-node@v4
106
106
+
with:
107
107
+
cache: npm
108
108
+
node-version-file: app/.node-version
109
109
+
cache-dependency-path: app/package-lock.json
85
110
- uses: actions/cache@v4
86
111
with:
87
112
path: |
···
95
120
run: |
96
121
rustup install stable
97
122
rustup default stable
123
123
+
- name: Run migrate
124
124
+
run: npx graphile-migrate migrate
98
125
- name: Run cargo test
99
126
run: cargo test
+3
-3
.github/workflows/sql.yml
···
2
2
on: push
3
3
4
4
env:
5
5
-
DATABASE_URL: postgresql://postgres:postgres@localhost/cartography
6
6
-
SHADOW_DATABASE_URL: postgresql://postgres:postgres@localhost/shadow
7
7
-
ROOT_DATABASE_URL: postgresql://postgres:postgres@localhost/postgres
5
5
+
DATABASE_URL: "postgresql://postgres:postgres@localhost/cartography"
6
6
+
SHADOW_DATABASE_URL: "postgresql://postgres:postgres@localhost/shadow"
7
7
+
ROOT_DATABASE_URL: "postgresql://postgres:postgres@localhost/postgres"
8
8
9
9
jobs:
10
10
migrate: