Skip to content

Commit

Permalink
Use atlas service
Browse files Browse the repository at this point in the history
Signed-off-by: 0ssigeno <s.berni@certego.net>
  • Loading branch information
0ssigeno committed Dec 7, 2023
1 parent b8990d8 commit a2ee052
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/actions/services/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
use_mongo:
description: Use mongo service
required: true
use_atlas:
description: Use atlas service
required: true


postgres_db:
description: Postgres service db. Requires use_postgres to be true
Expand Down Expand Up @@ -74,6 +78,18 @@ runs:
shell:
bash

- name: Create atlas local instance
if: inputs.use_atlas
run: |
apt-get install podman
curl https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.14.0_linux_x86_64.deb > /tmp/atlas_cli.deb
dpkg -i /tmp/atlas_cli.deb
rm /tmp/atlas_cli.deb
atlas deployments setup mongo --type local --force --skipMongosh --skipSampleData --tier M0
shell:
bash


- name: Create postgres docker-compose file
if: inputs.use_postgres
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ on:
default: false
type: boolean
required: false
use_atlas:
description: Use atlas service
default: false
type: boolean
required: false
use_celery:
description: Create a celery worker
default: false
Expand Down Expand Up @@ -435,6 +440,7 @@ jobs:
if: inputs.use_postgres || inputs.use_elastic_search || inputs.use_memcached || inputs.use_redis || inputs.use_rabbitmq || inputs.use_mongo
with:
use_mongo: ${{ inputs.use_mongo }}
use_atlas: ${{ inputs.use_atlas }}
use_redis: ${{ inputs.use_redis }}
use_postgres: ${{ inputs.use_postgres }}
use_elastic_search: ${{ inputs.use_elastic_search }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
use_rabbitmq: true
use_mongo: false
use_celery: true
use_atlas: true

celery_app: python_test.celery
celery_queues: default
Expand Down
16 changes: 16 additions & 0 deletions actions/services/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
use_mongo:
description: Use mongo service
required: true
use_atlas:
description: Use atlas service
required: true


postgres_db:
description: Postgres service db. Requires use_postgres to be true
Expand Down Expand Up @@ -74,6 +78,18 @@ runs:
shell:
bash

- name: Create atlas local instance
if: inputs.use_atlas
run: |
apt-get install podman
curl https://fastdl.mongodb.org/mongocli/mongodb-atlas-cli_1.14.0_linux_x86_64.deb > /tmp/atlas_cli.deb
dpkg -i /tmp/atlas_cli.deb
rm /tmp/atlas_cli.deb
atlas deployments setup mongo --type local --force --skipMongosh --skipSampleData --tier M0
shell:
bash


- name: Create postgres docker-compose file
if: inputs.use_postgres
run: |
Expand Down
6 changes: 6 additions & 0 deletions workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ on:
default: false
type: boolean
required: false
use_atlas:
description: Use atlas service
default: false
type: boolean
required: false
use_celery:
description: Create a celery worker
default: false
Expand Down Expand Up @@ -435,6 +440,7 @@ jobs:
if: inputs.use_postgres || inputs.use_elastic_search || inputs.use_memcached || inputs.use_redis || inputs.use_rabbitmq || inputs.use_mongo
with:
use_mongo: ${{ inputs.use_mongo }}
use_atlas: ${{ inputs.use_atlas }}
use_redis: ${{ inputs.use_redis }}
use_postgres: ${{ inputs.use_postgres }}
use_elastic_search: ${{ inputs.use_elastic_search }}
Expand Down
1 change: 1 addition & 0 deletions workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
use_rabbitmq: true
use_mongo: false
use_celery: true
use_atlas: true

celery_app: python_test.celery
celery_queues: default
Expand Down

0 comments on commit a2ee052

Please sign in to comment.