Skip to content

Commit

Permalink
Orkes Clients SDK methods (#228)
Browse files Browse the repository at this point in the history
Co-authored-by: Abhishek Gupta <[email protected]>
  • Loading branch information
v1r3n and coderabhigupta authored Dec 29, 2023
1 parent 2cc39d3 commit 193564f
Show file tree
Hide file tree
Showing 207 changed files with 11,199 additions and 2,539 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,7 @@ jobs:
run: >
DOCKER_BUILDKIT=1 docker build .
--progress=plain
--target=unit_test
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: >
DOCKER_BUILDKIT=1 docker build
--progress=plain
--build-arg KEY=${{ secrets.KEY }}
--build-arg SECRET=${{ secrets.SECRET }}
--build-arg CONDUCTOR_SERVER_URL=${{ secrets.CONDUCTOR_SERVER_URL }}
--target=test
.
--target=unit_test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,5 @@ latest.txt


.vscode/
tests/unit/automator/_trial_temp/_trial_marker
tests/unit/automator/_trial_temp/_trial_marker
42 changes: 21 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
ARG SDK_ORIGIN=local_sdk
ARG SDK_ORIGIN=no_sdk

FROM python:3.11-alpine as python_base
RUN apk add --no-cache tk
RUN mkdir /package
COPY /src /package/src
COPY /setup* /package/
COPY /README.md /package/
WORKDIR /package

FROM python_base as lint
FROM python_base as python_test_base
RUN mkdir -p /package
COPY / /package
WORKDIR /package
RUN pwd
RUN ls -ltr
ENV PYTHONPATH /package/src
RUN python3 -m pip install pylint
RUN python3 -m pylint --disable=all ./src

FROM python_base as local_sdk
ENV CONDUCTOR_PYTHON_VERSION="v0.0.0"
RUN python3 -m pip install .

FROM python_base as remote_sdk
ARG CONDUCTOR_PYTHON_VERSION
RUN python3 -m pip install conductor-python==${CONDUCTOR_PYTHON_VERSION}

FROM ${SDK_ORIGIN} as python_test_base
RUN rm -rf /package/src
COPY /tests /package/tests
#RUN python3 -m pylint --disable=all ./src
RUN python3 -m pip install coverage
RUN python3 -m pip install -r ./requirements.txt

FROM python_test_base as unit_test
ARG KEY
ARG SECRET
ARG CONDUCTOR_SERVER_URL
ENV KEY=${KEY}
ENV SECRET=${SECRET}
ENV CONDUCTOR_SERVER_URL=${CONDUCTOR_SERVER_URL}
RUN ls -ltr
RUN python3 -m unittest discover --verbose --start-directory=./tests/unit
RUN coverage run --source=./src/conductor/client/orkes -m unittest discover --verbose --start-directory=./tests/integration
RUN coverage report -m

FROM python_test_base as test
ARG KEY
Expand All @@ -34,7 +34,7 @@ ARG CONDUCTOR_SERVER_URL
ENV KEY=${KEY}
ENV SECRET=${SECRET}
ENV CONDUCTOR_SERVER_URL=${CONDUCTOR_SERVER_URL}
RUN python3 /package/tests/integration/main.py
RUN python3 ./tests/integration/main.py

FROM python_base as publish
RUN python3 -m pip install setuptools wheel build twine
Expand Down
Loading

0 comments on commit 193564f

Please sign in to comment.