From 4448499b3198d31dee7a8c8c6f4880907ad207fe Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Mon, 15 Jul 2024 09:46:43 +0200 Subject: [PATCH] try to break out ci pipeline --- .github/workflows/build.yml | 70 +++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8c3ae05..61359281 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ permissions: id-token: write jobs: - test: + test-elasticsearch: runs-on: ubuntu-latest services: elasticsearch: @@ -21,7 +21,33 @@ jobs: xpack.security.transport.ssl.enabled: "false" ports: - 9200:9200 - + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" + cache-dependency-path: setup.py + - name: Install dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: | + pip install -U pip setuptools wheel + sudo apt-get install -y -qq libicu-dev + pip install -q -e ".[dev]" + pip freeze + - name: Run pytest tests + env: + YENTE_INDEX_TYPE: elasticsearch + YENTE_INDEX_URL: http://elasticsearch:9200/ + run: | + make test + + test-opensearch: + runs-on: ubuntu-latest + services: opensearch: image: opensearchproject/opensearch:2.15.0 env: @@ -31,7 +57,7 @@ jobs: plugins.security.disabled: true OPENSEARCH_INITIAL_ADMIN_PASSWORD: YenteIns3cureDefault ports: - - 9400:9200 + - 9200:9200 steps: - uses: actions/checkout@v4 @@ -49,21 +75,35 @@ jobs: sudo apt-get install -y -qq libicu-dev pip install -q -e ".[dev]" pip freeze - - name: Run mypy strict type check - run: | - make typecheck - - name: Run pytest tests with elasticsearch backend - env: - YENTE_INDEX_TYPE: elasticsearch - YENTE_INDEX_URL: http://elasticsearch:9200/ - run: | - make test - name: Run pytest tests with opensearch backend env: YENTE_INDEX_TYPE: opensearch - YENTE_INDEX_URL: http://opensearch:9400/ + YENTE_INDEX_URL: http://opensearch:9200/ run: | make test + + package-python: + runs-on: ubuntu-latest + needs: [test-elasticsearch, test-opensearch] + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" + cache-dependency-path: setup.py + - name: Install dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: | + pip install -U pip setuptools wheel + sudo apt-get install -y -qq libicu-dev + pip install -q -e ".[dev]" + pip freeze + - name: Run mypy strict type check + run: | + make typecheck - name: Build a distribution run: | python setup.py sdist bdist_wheel @@ -73,9 +113,9 @@ jobs: with: skip-existing: true - build: + package-docker: runs-on: ubuntu-latest - needs: [test] + needs: [package-python] steps: - uses: actions/checkout@v4 - name: Set up QEMU