Skip to content

Commit f3e9dc0

Browse files
committed
try fix github actions
1 parent 3847f34 commit f3e9dc0

5 files changed

Lines changed: 31 additions & 29 deletions

File tree

.github/workflows/test_djelme.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,23 @@ jobs:
3131
django: ['4.2', '5.1', '5.2']
3232
# TODO: elasticsearch: ['6', '7', '8', '9']
3333
services:
34-
elasticsearch:
34+
elasticsearch6:
3535
image: elasticsearch:6.8.23
3636
ports:
37-
- 9201:9200
37+
- 9206:9200
3838
steps:
3939
- uses: actions/checkout@v4
4040
- uses: actions/setup-python@v5
4141
id: setup-py
4242
with:
4343
python-version: ${{ matrix.python }}
44-
- run: pip install -U tox
45-
- run: alias python${{ steps.setup-py.outputs.python-version }}=${{ steps.setup-py.outputs.python-path }}
46-
- run: TOXENV=`echo 'py${{ matrix.python }}-django${{matrix.django}}' | sed 's/\.//g'` tox
4744

45+
- name: alias python
46+
run: alias python${{ steps.setup-py.outputs.python-version }}=${{ steps.setup-py.outputs.python-path }}
47+
48+
- name: install despondencies
49+
run: pip install -U poetry && poetry install --with=dev --extras=elastic6
50+
51+
- run: TOXENV=`echo 'py${{ matrix.python }}-django${{matrix.django}}' | sed 's/\.//g'` poetry run tox
52+
env:
53+
ELASTICSEARCH6_HOST: localhost:9206

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ services:
1616
elasticsearch6:
1717
condition: service_healthy
1818
environment:
19-
# TOXENV: py311-django42
20-
ELASTICSEARCH6_HOST: elasticsearch6
21-
ELASTICSEARCH6_PORT: 9200
19+
# TOXENV: py310-django42
20+
ELASTICSEARCH6_HOST: elasticsearch6:9200
2221
networks:
2322
- djelme
2423
# volumes:

elasticsearch_metrics/tests/settings.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@
1616
DJELMETRICS_IMPS = {
1717
"default": {
1818
"DJELMETRICS_IMP": "elasticsearch_metrics.imps.elastic6",
19-
"host": os.environ.get("ELASTICSEARCH6_HOST"),
20-
"port": os.environ.get("ELASTICSEARCH6_PORT", 9200),
19+
"hosts": os.environ.get("ELASTICSEARCH6_HOST"),
2120
},
2221
# "elastic8foo": {
2322
# "DJELMETRICS_IMP": "elasticsearch_metrics.imps.elastic8",
24-
# "host": os.environ.get("ELASTICSEARCH8_HOST"),
25-
# "port": os.environ.get("ELASTICSEARCH8_PORT", 9200),
23+
# "hosts": os.environ.get("ELASTICSEARCH8_HOST"),
2624
# },
2725
# "elastic8bar": {
2826
# "DJELMETRICS_IMP": "elasticsearch_metrics.imps.elastic8",
29-
# "host": os.environ.get("ELASTICSEARCH8_HOST"),
30-
# "port": os.environ.get("ELASTICSEARCH8_PORT", 9200),
27+
# "hosts": os.environ.get("ELASTICSEARCH8_HOST"),
3128
# },
3229
}

poetry.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ build-backend = "poetry.core.masonry.api"
5252
[dependency-groups]
5353
tests = [
5454
"factory-boy==3.3.3",
55+
"tox>=4.0.0",
5556
]
5657
lint = [
5758
"pre-commit==2.17.0",
@@ -63,7 +64,6 @@ dev = [
6364
{ include-group = "tests" },
6465
{ include-group = "lint" },
6566
"konch>=3.0.0",
66-
"tox>=4.0.0",
6767
]
6868

6969
[tool.poetry]

0 commit comments

Comments
 (0)