Skip to content

Commit

Permalink
Add sdk test job that runs against an active server
Browse files Browse the repository at this point in the history
  • Loading branch information
legoktm committed Dec 15, 2023
1 parent 4c084ab commit 4529c14
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: SDK
on: [push, pull_request]

defaults:
run:
shell: bash

jobs:
sdk-with-server:
runs-on: ubuntu-latest
env:
DOCKERIZE_VERSION: "v0.7.0"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: "freedomofpress/securedrop"
path: "securedrop-server"
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz &&
sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz &&
rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
pip install poetry==1.6.1
- name: Run tests without VCR cassettes
run: |
# Start the server in the background
NUM_SOURCES=5 make -C securedrop-server dev &
# Wait for it to be up
dockerize -wait http://127.0.0.1:8080 -timeout 30m
# Install deps and run tests
cd client
poetry install --no-ansi
rm tests/sdk/data/*.yml
make test

0 comments on commit 4529c14

Please sign in to comment.