TypeScript #17
Workflow file for this run
This file contains hidden or 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: TypeScript | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| sha: | |
| required: true | |
| type: string | |
| env: | |
| ALUMNIUM_LOG_LEVEL: debug | |
| ALUMNIUM_LOG_PATH: alumnium.log | |
| ALUMNIUM_PLAYWRIGHT_HEADLESS: false | |
| DISPLAY: :99 | |
| LT_USERNAME: ${{ secrets.LT_USERNAME }} | |
| LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }} | |
| 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 }} | |
| DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| defaults: | |
| run: | |
| working-directory: packages/typescript | |
| jobs: | |
| examples: | |
| name: Examples | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| ALUMNIUM_MODEL: ${{ matrix.model }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - driver: appium | |
| model: azure_openai | |
| - driver: playwright | |
| model: azure_openai | |
| - driver: playwright | |
| model: google | |
| - driver: selenium | |
| model: azure_openai | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.sha || github.sha }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: npm | |
| cache-dependency-path: packages/typescript/package-lock.json | |
| node-version-file: .tool-versions | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/build-push-action@v6 | |
| env: | |
| DOCKER_BUILD_SUMMARY: false | |
| with: | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| context: . | |
| load: true | |
| tags: alumnium-server | |
| - if: matrix.driver != 'appium' | |
| run: Xvfb ${{ env.DISPLAY }} -screen 0 1600x1200x24 & | |
| - uses: actions/cache@v4 | |
| with: | |
| path: .alumnium/cache/ | |
| key: alumnium-cache-typescript-${{ matrix.driver }}-${{ matrix.model }}-${{ github.sha }} | |
| restore-keys: alumnium-cache-typescript-${{ matrix.driver }}-${{ matrix.model }}- | |
| - run: | | |
| docker run --name alumnium-server \ | |
| --detach \ | |
| --publish 8013:8013 \ | |
| --volume ${{ github.workspace }}/.alumnium/cache:/app/.alumnium/cache \ | |
| --env ALUMNIUM_LOG_LEVEL \ | |
| --env ALUMNIUM_LOG_PATH=stdout \ | |
| --env ALUMNIUM_MODEL \ | |
| --env ANTHROPIC_API_KEY \ | |
| --env AWS_ACCESS_KEY \ | |
| --env AWS_SECRET_KEY \ | |
| --env AZURE_OPENAI_API_KEY \ | |
| --env AZURE_OPENAI_API_VERSION \ | |
| --env AZURE_OPENAI_ENDPOINT \ | |
| --env DEEPSEEK_API_KEY \ | |
| --env GOOGLE_API_KEY \ | |
| --env MISTRAL_API_KEY \ | |
| --env OPENAI_API_KEY \ | |
| alumnium-server | |
| - run: npm install | |
| - if: matrix.driver == 'playwright' | |
| run: npx playwright install chromium | |
| - run: npm run examples:${{ matrix.driver }} | |
| - if: failure() && runner.debug == '1' | |
| uses: mxschmitt/action-tmate@v3 | |
| - if: always() | |
| run: docker logs alumnium-server > alumnium-server.log | |
| - if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ci-typescript-${{ matrix.driver }}-${{ matrix.model }} | |
| path: | | |
| packages/typescript/*.log | |
| packages/typescript/playwright-report/ | |
| packages/typescript/test-results/ |