From 57496ab27a38b346a0c50671b6610ed2e0b03d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1ek?= Date: Wed, 7 Aug 2024 13:32:10 +0200 Subject: [PATCH] avoid docker-compose on github actions (#185) * avoid docker-compose on github actions * fix-mgmt-api-error --- .github/workflows/tests.yml | 27 +++++++++++++++++++++------ server/cp/mgmt_api/factory.py | 2 +- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1b1d962..85a1bea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,21 +8,36 @@ jobs: server: runs-on: ubuntu-latest + services: + redis: + image: redis:alpine + ports: + - "6379:6379" + + mongo: + image: mongo:3.6 + ports: + - "27017:27017" + + elastic: + image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2 + ports: + - "9200:9200" + env: + discovery.type: single-node + defaults: run: working-directory: server steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.8 - - name: docker-compose - run: docker-compose -f ../.actions-docker-compose.yml up -d - - run: sudo apt-get update && sudo apt-get -y install libxml2-dev libxmlsec1-dev libxmlsec1-openssl - name: pip install @@ -47,7 +62,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: '14.x' diff --git a/server/cp/mgmt_api/factory.py b/server/cp/mgmt_api/factory.py index b2f9d15..9677b6a 100644 --- a/server/cp/mgmt_api/factory.py +++ b/server/cp/mgmt_api/factory.py @@ -31,7 +31,7 @@ class NewsroomMGMTAPI(BaseNewsroomApp): AUTH_SERVICE = JWTAuth def __init__(self, import_name=__package__, config=None, **kwargs): - if not getattr(self, 'settings'): + if not hasattr(self, 'settings'): self.settings = flask.Config('.') if config and config.get('BEHAVE'):