Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to specify container versions #186

Merged
merged 5 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/python_linter/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
- name: Pylint formatter
run: |
if [[ ${{ inputs.use_pylint }} != 'false' ]]; then
cd ..; pylint ${{ inputs.working_directory }} --rcfile ${GITHUB_WORKSPACE}/.github/configurations/python_linters/.pylintrc
pylint * --rcfile ${GITHUB_WORKSPACE}/.github/configurations/python_linters/.pylintrc
else
echo "Skipping pylint formatter"
fi
Expand Down
28 changes: 22 additions & 6 deletions .github/actions/services/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ inputs:
description: Use mongo service
required: true


postgres_db:
description: Postgres service db. Requires use_postgres to be true
required: true
Expand All @@ -34,6 +33,23 @@ inputs:
description: Postgres alpine version
required: true

mongo_version:
description: Mongo container version
required: true
elasticsearch_version:
description: Elasticsearch container version
required: true
memcached_version:
description: Memcached alpine container version
required: true
redis_version:
description: Redis alpine container version
required: true
rabbitmq_version:
description: RabbitMQ management-alpine container version
required: true


runs:
using: "composite"
steps:
Expand All @@ -44,7 +60,7 @@ runs:
echo "version: '3.7'" > mongo.yml
echo "services:" >> mongo.yml
echo " mongo:" >> mongo.yml
echo " image: library/mongo:4.4" >> mongo.yml
echo " image: library/mongo:{{ inputs.mongo_version }}" >> mongo.yml
echo " container_name: mongo" >> mongo.yml
echo " ports:" >> mongo.yml
echo " - 27017:27017" >> mongo.yml
Expand Down Expand Up @@ -83,7 +99,7 @@ runs:
echo "version: '3.7'" > elastic_search.yml
echo "services:" >> elastic_search.yml
echo " elastic_search:" >> elastic_search.yml
echo " image: elasticsearch:7.10.1" >> elastic_search.yml
echo " image: elasticsearch:${{ inputs.elasticsearch_version }}" >> elastic_search.yml
echo " container_name: elastic_search" >> elastic_search.yml
echo " environment:" >> elastic_search.yml
echo " ES_JAVA_OPTS: -Xms1g -Xmx1g" >> elastic_search.yml
Expand All @@ -105,7 +121,7 @@ runs:
echo "services:" >> memcached.yml
echo " memcached:" >> memcached.yml
echo " container_name: memcached" >> memcached.yml
echo " image: memcached:1.6.9-alpine" >> memcached.yml
echo " image: memcached:${{ inputs.memcached_version }}-alpine" >> memcached.yml
echo " ports:" >> memcached.yml
echo " - 11211:11211" >> memcached.yml
shell:
Expand All @@ -118,7 +134,7 @@ runs:
echo "services:" >> redis.yml
echo " redis:" >> redis.yml
echo " container_name: redis" >> redis.yml
echo " image: library/redis:5.0.9-alpine" >> redis.yml
echo " image: library/redis:${{ inputs.redis_version }}-alpine" >> redis.yml
echo " ports:" >> redis.yml
echo " - 6379:6379" >> redis.yml
shell:
Expand All @@ -131,7 +147,7 @@ runs:
echo "services:" >> rabbitmq.yml
echo " rabbitmq:" >> rabbitmq.yml
echo " container_name: rabbitmq" >> rabbitmq.yml
echo " image: library/rabbitmq:3.9-management-alpine" >> rabbitmq.yml
echo " image: library/rabbitmq:${{ inputs.rabbitmq_version }}-management-alpine" >> rabbitmq.yml
echo " ports:" >> rabbitmq.yml
echo " - 15672:15672" >> rabbitmq.yml
echo " - 5672:5672" >> rabbitmq.yml
Expand Down
6 changes: 6 additions & 0 deletions .github/configurations/node_linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ In `.vscode/settings.json`
"overrideConfigFile": ".github/configurations/node_linters/eslint/.eslintrc.json"
},
"stylelint.configFile": ".github/configurations/node_linters/stylelint/.stylelintrc.json",
"stylelint.validate": ["css", "less", "postcss", "scss"],
"stylelint.snippet": ["css", "less", "postcss", "scss"],
"prettier.configPath": ".github/configurations/node_linters/prettier/.prettierrc.js",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
```
26 changes: 26 additions & 0 deletions .github/workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,32 @@ on:
required: false
default: 10.14

mongo_version:
description: Mongo container version
type: string
required: false
default: 4.4
elasticsearch_version:
description: Elasticsearch container version
type: string
required: false
default: 7.10.1
memcached_version:
description: Memcached alpine container version
type: string
required: false
default: 1.6.9
redis_version:
description: Redis alpine container version
type: string
required: false
default: 5.0.9
rabbitmq_version:
description: RabbitMQ management-alpine container version
type: string
required: false
default: 3.9

celery_app:
description: Celery app name. Requires use_celery to be true
type: string
Expand Down
28 changes: 22 additions & 6 deletions actions/services/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ inputs:
description: Use mongo service
required: true


postgres_db:
description: Postgres service db. Requires use_postgres to be true
required: true
Expand All @@ -34,6 +33,23 @@ inputs:
description: Postgres alpine version
required: true

mongo_version:
description: Mongo container version
required: true
elasticsearch_version:
description: Elasticsearch container version
required: true
memcached_version:
description: Memcached alpine container version
required: true
redis_version:
description: Redis alpine container version
required: true
rabbitmq_version:
description: RabbitMQ management-alpine container version
required: true


runs:
using: "composite"
steps:
Expand All @@ -44,7 +60,7 @@ runs:
echo "version: '3.7'" > mongo.yml
echo "services:" >> mongo.yml
echo " mongo:" >> mongo.yml
echo " image: library/mongo:4.4" >> mongo.yml
echo " image: library/mongo:{{ inputs.mongo_version }}" >> mongo.yml
echo " container_name: mongo" >> mongo.yml
echo " ports:" >> mongo.yml
echo " - 27017:27017" >> mongo.yml
Expand Down Expand Up @@ -83,7 +99,7 @@ runs:
echo "version: '3.7'" > elastic_search.yml
echo "services:" >> elastic_search.yml
echo " elastic_search:" >> elastic_search.yml
echo " image: elasticsearch:7.10.1" >> elastic_search.yml
echo " image: elasticsearch:${{ inputs.elasticsearch_version }}" >> elastic_search.yml
echo " container_name: elastic_search" >> elastic_search.yml
echo " environment:" >> elastic_search.yml
echo " ES_JAVA_OPTS: -Xms1g -Xmx1g" >> elastic_search.yml
Expand All @@ -105,7 +121,7 @@ runs:
echo "services:" >> memcached.yml
echo " memcached:" >> memcached.yml
echo " container_name: memcached" >> memcached.yml
echo " image: memcached:1.6.9-alpine" >> memcached.yml
echo " image: memcached:${{ inputs.memcached_version }}-alpine" >> memcached.yml
echo " ports:" >> memcached.yml
echo " - 11211:11211" >> memcached.yml
shell:
Expand All @@ -118,7 +134,7 @@ runs:
echo "services:" >> redis.yml
echo " redis:" >> redis.yml
echo " container_name: redis" >> redis.yml
echo " image: library/redis:5.0.9-alpine" >> redis.yml
echo " image: library/redis:${{ inputs.redis_version }}-alpine" >> redis.yml
echo " ports:" >> redis.yml
echo " - 6379:6379" >> redis.yml
shell:
Expand All @@ -131,7 +147,7 @@ runs:
echo "services:" >> rabbitmq.yml
echo " rabbitmq:" >> rabbitmq.yml
echo " container_name: rabbitmq" >> rabbitmq.yml
echo " image: library/rabbitmq:3.9-management-alpine" >> rabbitmq.yml
echo " image: library/rabbitmq:${{ inputs.rabbitmq_version }}-management-alpine" >> rabbitmq.yml
echo " ports:" >> rabbitmq.yml
echo " - 15672:15672" >> rabbitmq.yml
echo " - 5672:5672" >> rabbitmq.yml
Expand Down
26 changes: 26 additions & 0 deletions workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,32 @@ on:
required: false
default: 10.14

mongo_version:
description: Mongo container version
type: string
required: false
default: 4.4
elasticsearch_version:
description: Elasticsearch container version
type: string
required: false
default: 7.10.1
memcached_version:
description: Memcached alpine container version
type: string
required: false
default: 1.6.9
redis_version:
description: Redis alpine container version
type: string
required: false
default: 5.0.9
rabbitmq_version:
description: RabbitMQ management-alpine container version
type: string
required: false
default: 3.9

celery_app:
description: Celery app name. Requires use_celery to be true
type: string
Expand Down
8 changes: 8 additions & 0 deletions workflows/_release_and_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
if: github.event.pull_request.merged == true && ( github.base_ref == 'master' || github.base_ref == 'main' )
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you do not retrieve the tags

- name: Check Tag
id: check-tag
Expand All @@ -59,6 +61,12 @@ jobs:
target_commitish: ${{ github.base_ref }}
append_body: true

- name: Checkout created tag
uses: actions/checkout@v4
if: steps.check-tag.outputs.match == 'true' && ( inputs.publish_on_test_pypi || inputs.publish_on_pypi)
with:
fetch-depth: 0 # otherwise, you do not retrieve the tags

- uses: actions/setup-python@v1
if: steps.check-tag.outputs.match == 'true' && (inputs.publish_on_pypi || inputs.publish_on_test_pypi)
with:
Expand Down
Loading