This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (48 loc) · 1.59 KB
/
test-all.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
name: Test all modules E2E
on:
- push
env:
CURRENT_WORKING_ENGINE_COMMIT: 9950b74d0a905914927e1f91d2f3c51729333fad
jobs:
build:
runs-on: ubuntu-20.04
steps:
# Checkout registry repo
- name: Checkout registry Repo
uses: actions/checkout@v4
with:
path: opengb-registry
# Get engine repo to test against
- name: Checkout engine repo
uses: actions/checkout@v4
with:
repository: rivet-gg/opengb
token: ${{ secrets.GH_DEPLOY_KEY }}
ref: $CURRENT_WORKING_ENGINE_COMMIT
path: opengb-engine
# Install Deno to run OpenGB
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: "1.41.1"
# Install the checked-out OpenGB engine
- name: Build OpenGB
run: cd opengb-engine/ && deno task cli:install
# Create a test project to test the OpenGB engine with
- name: Create Test Project
run: |
cd opengb-registry/
mkdir -p ./test_project
cd ./test_project/
mkdir -p ./dummy-modules
echo '
registries:
default: { local: { directory: ../modules } }
local: { local: { directory: ./dummy-modules } }
modules:
' | cat > ./backend.yaml
ls ../modules | while read line; do echo " $line: {}" >> ./backend.yaml; done
- name: Setup OpenGB databases
run: cd ./opengb-registry/test_project opengb db dev
- name: Run Tests
run: cd ./opengb-registry/test_project/ && opengb test