Change Aryn-SDK Error Message (#622) #1737
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Can't filter on paths easily and have required workflows. | |
# See https://github.com/orgs/community/discussions/13690 and | |
# https://engineering.mixpanel.com/enforcing-required-checks-on-conditional-ci-jobs-in-a-github-monorepo-8d4949694340 | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | |
SYCAMORE_S3_TEMP_PATH: s3://aryn-sycamore-integ-temp/ | |
MODEL_SERVER_KEY: ${{ secrets.MODEL_SERVER_KEY }} | |
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | |
ARYN_API_KEY: ${{ secrets.MODEL_SERVER_KEY }} | |
SYCAMORE_HELICONE_API_KEY: ${{ secrets.HELICONE_API_KEY }} | |
SYCAMORE_OPENAI_USER: 'sycamore-github-ci' | |
SYCAMORE_HELICONE_TAG: ${{ github.ref }} | |
# Permissions for AWS access | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
sycamore-unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- name: Install sycamore | |
run: poetry install | |
working-directory: lib/sycamore | |
- name: Update Apt | |
run: sudo apt-get update | |
- name: Install poppler and tesseract | |
run: sudo apt-get install -y poppler-utils tesseract-ocr | |
- name: Run tests | |
run: poetry run pytest sycamore/tests/unit/ | |
working-directory: lib/sycamore | |
rps-unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install RPS | |
run: make install_rps | |
working-directory: lib/remote-processors | |
- name: Run Tests | |
run: poetry run pytest remote_processors/test/unit/ | |
working-directory: lib/remote-processors | |
integ-tests: | |
runs-on: integ-test-runner | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
services: | |
opensearch: | |
image: opensearchproject/opensearch:2.10.0 | |
env: | |
discovery.type: "single-node" | |
ports: | |
- 9200:9200 | |
elasticsearch: | |
image: elasticsearch:8.14.2 | |
env: | |
discovery.type: "single-node" | |
xpack.security.http.ssl.enabled: "false" | |
xpack.security.enabled: "false" | |
bootstrap.memory_lock: "true" | |
ES_JAVA_OPTS: "-Xms2g -Xmx2g" | |
ports: | |
- 9201:9200 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- name: Install sycamore | |
run: poetry install | |
- name: Download nltk packages | |
run: poetry run python -m nltk.downloader punkt averaged_perceptron_tagger | |
- name: Update Apt | |
run: sudo apt-get update | |
- name: Install poppler and tesseract | |
run: sudo apt-get install -y poppler-utils tesseract-ocr | |
- name: Configure AWS Credentials via OIDC provider. | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::237550789389:role/aryn-github-integ | |
- name: Run Integ tests | |
run: poetry run pytest lib/sycamore/sycamore/tests/integration | |
- name: Run Notebook tests | |
run: poetry run pytest --nbmake --nbmake-timeout=600 notebooks/default-prep-script.ipynb notebooks/jupyter_dev_example.ipynb notebooks/metadata-extraction.ipynb notebooks/sycamore_demo.ipynb notebooks/tutorial.ipynb |