Skip to content

Commit

Permalink
Add integration tests sqlant => mermaid (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurotych authored Apr 13, 2024
1 parent e8e46f1 commit 154955e
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:
run_integration_and_smoke_tests:
docker:
- image: cimg/rust:1.77
- image: cimg/rust:1.77-node
environment:
TEST_DATABASE_URL: postgresql://sql:sql@localhost/sql
- image: cimg/postgres:14.2
Expand All @@ -21,8 +21,6 @@ jobs:
- run: psql -d $TEST_DATABASE_URL -f ./tests/test_schema.sql
- run: CON_STRING=$TEST_DATABASE_URL cargo test
- run: cargo build --release
- run: ./target/release/sqlant $TEST_DATABASE_URL > result.puml
- run: curl --fail -X POST http://localhost:8080/png --data-binary @result.puml -o test.png

- run: ./target/release/sqlant $TEST_DATABASE_URL > result.puml
- run: curl --fail -X POST http://localhost:8080/png --data-binary @result.puml -o test.png
Expand All @@ -37,7 +35,27 @@ jobs:
- run: curl --fail -X POST http://localhost:8080/png --data-binary @result.puml -o test.png

- run: ./target/release/sqlant $TEST_DATABASE_URL -s test_schema > result.puml
- run: ./target/release/sqlant $TEST_DATABASE_URL -o mermaid
- run: curl --fail -X POST http://localhost:8080/png --data-binary @result.puml -o test.png

# Mermaid
- run: npm install -g @mermaid-js/mermaid-cli
- run: sudo apt install chromium-bsu libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libxcomposite1 libxdamage1

- run: ./target/release/sqlant $TEST_DATABASE_URL -o mermaid > input.mmd
- run: mmdc -i input.mmd -o output.png

- run: ./target/release/sqlant $TEST_DATABASE_URL --nn -o mermaid > input.mmd
- run: mmdc -i input.mmd -o output.png

- run: ./target/release/sqlant $TEST_DATABASE_URL --en -o mermaid > input.mmd
- run: mmdc -i input.mmd -o output.png

- run: ./target/release/sqlant $TEST_DATABASE_URL -n -e -o mermaid > input.mmd
- run: mmdc -i input.mmd -o output.png

- run: ./target/release/sqlant $TEST_DATABASE_URL -s test_schema -o mermaid > input.mmd
- run: mmdc -i input.mmd -o output.png

resource_class: small

workflows:
Expand Down

0 comments on commit 154955e

Please sign in to comment.