Skip to content

Commit

Permalink
Setup Fauna project in GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Griffin committed Nov 19, 2024
1 parent 51f521a commit c938843
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
with:
java-version: '17'
distribution: corretto
- name: Setup Test Database
run: ./setup.sh

- name: Run sample app
run: ./gradlew build
3 changes: 3 additions & 0 deletions test/local-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
schema_directory=schema
default=local

10 changes: 10 additions & 0 deletions test/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DB_NAME="ECommerceJava"
LOCAL_ENDPOINT="http://localhost:8443/"
SECRET="secret"

cp ./test/local-project .fauna-project

fauna endpoint add local --url "$LOCAL_ENDPOINT" --secret "$SECRET"
fauna endpoint select local

fauna create-database "$DB_NAME"
7 changes: 7 additions & 0 deletions test/validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/sh

ENDPOINT="http://localhost:8080"

curl -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer secret" "$ENDPOINT/products?pageSize=1"


0 comments on commit c938843

Please sign in to comment.