Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit c41503a

Browse files
committed
feat(CI): Create CI for testing all modules based on a known-good engine commit
1 parent 596c668 commit c41503a

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/test-all.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test all modules E2E
2+
on:
3+
- push
4+
5+
env:
6+
CURRENT_WORKING_ENGINE_COMMIT: 9950b74d0a905914927e1f91d2f3c51729333fad
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
# Checkout registry repo
13+
- name: Checkout registry Repo
14+
uses: actions/checkout@v4
15+
with:
16+
path: opengb-registry
17+
18+
# Get engine repo to test against
19+
- name: Checkout engine repo
20+
uses: actions/checkout@v4
21+
with:
22+
repository: rivet-gg/opengb
23+
token: ${{ secrets.GH_DEPLOY_KEY }}
24+
ref: $CURRENT_WORKING_ENGINE_COMMIT
25+
path: opengb-engine
26+
27+
# Install Deno to run OpenGB
28+
- name: Install Deno
29+
uses: denoland/setup-deno@v1
30+
with:
31+
deno-version: "1.41.1"
32+
33+
# Install the checked-out OpenGB engine
34+
- name: Build OpenGB
35+
run: cd opengb-engine/ && deno task cli:install
36+
37+
38+
# Create a test project to test the OpenGB engine with
39+
- name: Create Test Project
40+
run: |
41+
cd opengb-registry/
42+
mkdir -p ./test_project
43+
cd ./test_project/
44+
45+
mkdir -p ./dummy-modules
46+
47+
echo '
48+
registries:
49+
default: { local: { directory: ../modules } }
50+
local: { local: { directory: ./dummy-modules } }
51+
modules:
52+
' | cat > ./backend.yaml
53+
54+
ls ../modules | while read line; do echo " $line: {}" >> ./backend.yaml; done
55+
56+
57+
- name: Setup OpenGB databases
58+
run: cd ./opengb-registry/test_project opengb db dev
59+
60+
- name: Run Tests
61+
run: cd ./opengb-registry/test_project/ && opengb test

0 commit comments

Comments
 (0)