diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06e7f591..25eba1ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: Continuous integration -on: [pull_request] +on: [push, pull_request] jobs: @@ -27,6 +27,28 @@ jobs: with: command: check + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - run: find tests/ + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Start background server # Used for the integration tests + run: > + docker build --file tests/Dockerfile --tag flask_runner tests && + docker run --name flask_runner --volume $(pwd)/tests/suite:/suite --detach flask_runner + - uses: actions-rs/cargo@v1 + with: + command: test + fmt: name: Rustfmt runs-on: ubuntu-latest diff --git a/tests/Dockerfile b/tests/Dockerfile new file mode 100644 index 00000000..4a167d49 --- /dev/null +++ b/tests/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.8-alpine + +RUN pip install flask + +ENTRYPOINT ["/suite/bin/jsonschema_suite"] \ No newline at end of file