Skip to content

Extracting API

Extracting API #121

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_API_VERSION: ${{ secrets.AZURE_OPENAI_API_VERSION }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
DISPLAY: :99
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
ALUMNIUM_DRIVER: ${{ matrix.driver }}
ALUMNIUM_MODEL: ${{ matrix.model }}
strategy:
fail-fast: false
matrix:
driver:
- playwright
- selenium
model:
- anthropic
- aws_anthropic
- aws_meta
- azure_openai
- google
- openai
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: abatilo/actions-poetry@v2
- uses: actions/cache@v4
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- run: Xvfb ${{ env.DISPLAY }} &
- run: echo ALUMNIUM_DEBUG=${{ runner.debug }} >> "$GITHUB_ENV"
- run: poetry install
- if: matrix.driver == 'playwright'
run: poetry run playwright install chromium
- run: poetry run behave --format html-pretty --outfile reports/behave.html --format pretty
- run: poetry run pytest --html reports/pytest.html
- if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3
- if: always()
uses: actions/upload-artifact@v4
with:
name: reports-${{ matrix.driver }}-${{ matrix.model }}
path: reports/
release:
name: Release
runs-on: ubuntu-latest
needs: test
environment: release
if: github.ref_name == 'main' && startsWith(github.event.head_commit.message, 'release:')
permissions:
attestations: write
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: abatilo/actions-poetry@v2
- uses: actions/cache@v4
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- run: poetry install
- run: poetry build
- run: echo "version=$(poetry version --short)" >> "$GITHUB_OUTPUT"
id: version
- uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
- run: gh release create ${{ steps.version.outputs.version }} --generate-notes dist/*
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
- if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true