ci: add Test API Contract workflow

This commit is contained in:
Jack Michaud
2023-01-01 13:02:52 -05:00
parent 29b08875d4
commit 857eaf26b1
2 changed files with 36 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
name: Test API Contract
on:
push:
branches:
- main
pull_request:
workflow_call:
jobs:
test-contract:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: cd oasst-shared && pip install -e .
- run: cd discord-bot && pip install -r requirements.txt
- run: cd discord-bot && pip install -r requirements.dev.txt
- run: ./scripts/backend-development/start-mock-server.sh
# runs the contract tests. currently the api client is
# found in the discord bot code, but this should be updated
# once the client moves into oasst-shared.
- name: Run contract tests
run: ./scripts/discord-bot-development/test.sh
- run: ./scripts/backend-development/stop-mock-server.sh
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
docker stop oasst-mock-backend