-
Notifications
You must be signed in to change notification settings - Fork 44
63 lines (62 loc) · 1.95 KB
/
sqlite.yaml
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
name: SQLite
on:
push:
branches: [main]
paths-ignore:
- '**.md'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Setup Go env
uses: actions/setup-go@v5
with:
go-version: "^1.23.0"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build binary
run: make dev
working-directory: cmd/warrant
- name: Install apirunner
run: go install github.com/warrant-dev/apirunner/cmd/apirunner@latest
- name: Start test server
id: start-server
run: ./cmd/warrant/bin/warrant > server.log 2>&1 &
env:
WARRANT_AUTOMIGRATE: true
WARRANT_PORT: 8000
WARRANT_LOGLEVEL: 0
WARRANT_ENABLEACCESSLOG: true
WARRANT_AUTHENTICATION_APIKEY: warrant_api_key
WARRANT_CHECK_CONCURRENCY: 4
WARRANT_CHECK_MAXCONCURRENCY: 1000
WARRANT_CHECK_TIMEOUT: 1m
WARRANT_DATASTORE: sqlite
WARRANT_DATASTORE_SQLITE_DATABASE: warrant
WARRANT_DATASTORE_SQLITE_INMEMORY: true
WARRANT_DATASTORE_SQLITE_MIGRATIONSOURCE: file://./migrations/datastore/sqlite
WARRANT_DATASTORE_SQLITE_MAXIDLECONNECTIONS: 1
WARRANT_DATASTORE_SQLITE_MAXOPENCONNECTIONS: 1
WARRANT_DATASTORE_SQLITE_CONNMAXIDLETIME: 4h
WARRANT_DATASTORE_SQLITE_CONNMAXLIFETIME: 6h
- name: Run apirunner tests
run: |
sleep 3
apirunner tests/ '.*' tests/ci-apirunner.conf
- name: Shutdown test server
if: success() || (failure() && steps.start-server.outcome == 'success')
run: kill -9 `lsof -i:8000 -t`
- name: Archive server log
if: failure()
uses: actions/upload-artifact@v4
with:
name: server-log
path: server.log
if-no-files-found: warn
retention-days: 5