Fix POST /ratings #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: integration | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/postgres" | |
services: | |
postgres: | |
image: ghcr.io/peopleforbikes/docker-postgis-bna:17-3.4-1 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 | |
- name: Install HURL | |
run: | | |
HURL_VERSION=6.0.0 | |
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/$HURL_VERSION/hurl_${HURL_VERSION}_amd64.deb | |
sudo apt install ./hurl_${HURL_VERSION}_amd64.deb | |
- name: Seed the database | |
run: psql $DATABASE_URL < lambdas/tests/database-with-test-data.sql | |
- name: Build the API server | |
run: cargo build --release -p lambdas --bin axumed | |
- name: Start the standalone API server | |
run: > | |
BNA_API_LOG_LEVEL=debug | |
BNA_API_STANDALONE=1 | |
cargo run --release -p lambdas --bin axumed & | |
- run: sleep 5 | |
- name: Run the public smoke-tests | |
run: > | |
hurl | |
--test | |
--variables-file lambdas/tests/localhost.vars | |
lambdas/tests/smoke/public.hurl | |
- name: Run the scenarios tests | |
run: > | |
hurl | |
--test | |
--variables-file lambdas/tests/localhost.vars | |
lambdas/tests/scenario/pagination.hurl | |
- name: Run the endpoint tests | |
run: > | |
hurl | |
--test | |
--variables-file lambdas/tests/localhost.vars | |
lambdas/tests/endpoints/cities.hurl | |
lambdas/tests/endpoints/pricing.hurl | |
lambdas/tests/endpoints/ratings.hurl | |
# - uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 | |
# with: | |
# enable-cache: true | |
# - name: Set up Python | |
# run: uv python install | |
# | |
# Schemathesis causes the server to crash somehow. | |
# ``` | |
# Network Error | |
# | |
# Connection failed | |
# | |
# Connection aborted. Remote end closed connection without response | |
# ``` | |
# This will require more investigation to be run in the CI. | |
# - name: Run Schemathesis | |
# run: > | |
# cd lambdas/tests && | |
# RUST_BACKTRACE=1 | |
# uv run st run | |
# --base-url http://localhost:3000/ | |
# --cassette-path cassette.yaml | |
# -vvv | |
# -x | |
# --show-trace | |
# --generation-allow-x00 false | |
# --exclude-method 'POST' | |
# --exclude-method 'PATCH' | |
# ../../openapi-3.0.yaml |