Add more LLM providers and their tests, improve docs #47
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: GenVM pr | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
defaults: | |
run: | |
shell: bash -x {0} | |
jobs: | |
initial: | |
uses: ./.github/workflows/initial-template.yaml | |
secrets: inherit | |
### MODULE TESTS | |
module-test-cargo: | |
needs: [initial] | |
runs-on: ubuntu-latest | |
if: needs.initial.outputs.rs-changed == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get source | |
uses: ./.github/actions/get-src | |
with: | |
install_also: --rust | |
- name: configure and run codegen | |
run: | | |
cd "$GITHUB_WORKSPACE" && ./tools/ya-build/ya-build config && \ | |
ninja -v -C build tags/codegen | |
- name: check format | |
run: | | |
./build-scripts/cargo-fmt.sh && \ | |
git diff -U1 --exit-code | |
- name: cargo test | |
run: | | |
./build-scripts/cargo-test.sh | |
env: | |
OPENAIKEY: ${{ secrets.OPENAIKEY }} | |
HEURISTKEY: ${{ secrets.HEURISTKEY }} | |
ANTHROPICKEY: ${{ secrets.ANTHROPICKEY }} | |
XAIKEY: ${{ secrets.XAIKEY }} | |
GEMINIKEY: ${{ secrets.GEMINIKEY }} | |
module-test-python: | |
needs: [initial] | |
runs-on: ubuntu-latest | |
if: needs.initial.outputs.py-changed == 'true' | |
steps: | |
- run: sudo apt-get install -y python3-poetry | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: poetry | |
- name: Get source | |
uses: ./.github/actions/get-src | |
with: | |
load_submodules: "false" | |
- name: install dependencies | |
run: | | |
python3.12 -m pip install poetry && \ | |
pushd runners/genlayer-py-std && \ | |
poetry install && \ | |
popd | |
- name: pytest | |
run: | | |
pushd runners/genlayer-py-std && \ | |
poetry run pytest -n auto && \ | |
popd | |
### END | |
validate-end: | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
needs: | |
- initial | |
- module-test-cargo | |
- module-test-python | |
steps: | |
- run: | | |
echo ${{ join(needs.*.result, ' ') }} | grep -vP 'failure|cancelled' |