Skip to content

Commit

Permalink
try to break out ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Jul 15, 2024
1 parent 2eb7d81 commit 4448499
Showing 1 changed file with 55 additions and 15 deletions.
70 changes: 55 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
id-token: write

jobs:
test:
test-elasticsearch:
runs-on: ubuntu-latest
services:
elasticsearch:
Expand All @@ -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:
Expand All @@ -31,7 +57,7 @@ jobs:
plugins.security.disabled: true
OPENSEARCH_INITIAL_ADMIN_PASSWORD: YenteIns3cureDefault
ports:
- 9400:9200
- 9200:9200

steps:
- uses: actions/checkout@v4
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4448499

Please sign in to comment.