Skip to content

Commit

Permalink
circleci: try 15
Browse files Browse the repository at this point in the history
  • Loading branch information
ElysaSrc committed Mar 6, 2025
1 parent f4115d3 commit 3a30e1b
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ jobs:
docker:
- image: cimg/rust:<< pipeline.parameters.rust-version >>
- image: cimg/postgres:17.0-postgis
name: postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_PASSWORD: password$
steps:
- checkout
- setup_remote_docker
Expand All @@ -96,37 +95,29 @@ jobs:
- restore_cache:
keys:
- tests-editoast-{{ checksum "/tmp/src_checksum" }}

- run:
name: Run Editoast Tests
working_directory: editoast
name: Install and run OpenFGA
background: true
environment:
DATABASE_URL: postgres://osrd:password@localhost/osrd
CI: "true"
OPENFGA_DATASTORE_ENGINE: "postgres"
OPENFGA_DATASTORE_URI: "postgres://osrd:password@postgres:5432/osrd?search_path=openfga"
OPENFGA_HTTP_ADDR: "0.0.0.0:8091"
command: |
echo "DEBUG"
docker inspect $(docker ps -q --filter ancestor=cimg/postgres:17.0-postgis | head -n 1)
echo "END DEBUG"
sudo mkdir -p /opt/openfga
curl -L https://github.com/openfga/openfga/releases/download/v<< pipeline.parameters.openfga-version >>/openfga_<< pipeline.parameters.openfga-version >>_linux_amd64.tar.gz | sudo tar -xz -C /opt/openfga
/opt/openfga/openfga migrate
/opt/openfga/openfg run
- run:
name: Run Editoast Tests
working_directory: editoast
environment:
DATABASE_URL: postgres://osrd:password@localhost/osrd
CI: "true"
command: |
if [ ! -f "/tmp/tests_passed" ]; then
psql postgresql://postgres:password@localhost -f ../docker/init_db.sql
docker run --rm \
-e OPENFGA_DATASTORE_ENGINE \
-e OPENFGA_DATASTORE_URI \
-e OPENFGA_HTTP_ADDR \
openfga/openfga:v<< pipeline.parameters.openfga-version >> migrate
# Run openfga
docker run --rm -d \
-e OPENFGA_DATASTORE_ENGINE \
-e OPENFGA_DATASTORE_URI \
-e OPENFGA_HTTP_ADDR \
-p 8091:8091 \
openfga/openfga:v<< pipeline.parameters.openfga-version >> run
sudo apt-get update
sudo apt-get install -y libgeos-dev libpq-dev
cargo install diesel_cli --no-default-features --features postgres
Expand Down

0 comments on commit 3a30e1b

Please sign in to comment.