-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (42 loc) · 1.28 KB
/
ci.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
name: CI
on:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
build_test:
name: Build and Test
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Install dependencies
run: sudo apt-get update -y && sudo apt-get install -y gcc git-core gnupg build-essential
- name: Install juju-db
run: sudo snap install juju-db --channel 4.4/stable
- name: Create test certs
run: make certs
- name: Start test environment
run: docker compose up -d --wait
- name: Run OpenFGA authorisation model tests
uses: openfga/[email protected]
with:
store-file-path: ./openfga/tests.fga.yaml
- name: Build and Test
run: go test -mod readonly ./... -timeout 1h -cover
env:
JIMM_DSN: postgresql://jimm:jimm@localhost:5432/jimm
JIMM_TEST_PGXDSN: postgresql://jimm:jimm@localhost:5432/jimm
PGHOST: localhost
PGPASSWORD: jimm
PGSSLMODE: disable
PGUSER: jimm
PGPORT: 5432