-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (57 loc) · 1.83 KB
/
Copy pathci.yml
File metadata and controls
71 lines (57 loc) · 1.83 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cache-clojure-deps
with:
key-label: 'lint'
# Installs java, clojure, babashka and clj-kondo as pinned in .mise.toml
- uses: jdx/mise-action@v2
- name: Lint
run: bb lint
# Asserts the clj-kondo config we publish to consumers still produces
# exactly the findings lint-fixtures/ is annotated with. Needs no database.
- name: Exported clj-kondo config
run: clojure -M:test:test-runner --focus dbos.kondo-test
test:
name: Test
runs-on: ubuntu-latest
# DBOS creates its own system schema (the integration tests run with
# :migrate? true), so no init SQL is needed — just a reachable Postgres.
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dbos_clj_test
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cache-clojure-deps
with:
key-label: 'tests'
# Installs the java + clojure versions pinned in .mise.toml
- uses: jdx/mise-action@v2
# Warm the dependency cache once so failures below are about tests.
- name: Fetch deps
run: clojure -P -M:test:test-runner
- name: Tests
env:
DBOS_TEST_DATABASE_URL: jdbc:postgresql://localhost:5432/dbos_clj_test
DBOS_TEST_DB_USER: postgres
DBOS_TEST_DB_PASSWORD: postgres
run: clojure -M:test:test-runner