Skip to content

Improve CLI input validation + secret checking #1207

Improve CLI input validation + secret checking

Improve CLI input validation + secret checking #1207

Workflow file for this run

name: Python Application
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
environment: Scheduled Testing
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Write secrets
env:
SECRETS_CONFIG: |
[anthropic]
api_key = "fake"
[together]
api_key = "fake"
[openai]
api_key = "fake"
[hugging_face]
token = "fake"
[google_ai]
api_key = "fake"
[mistralai]
api_key = "fake"
[vertexai]
project_id = "fake"
region = "us-central1"
[azure_phi_3_5_mini_endpoint]
api_key = "fake"
[azure_phi_3_5_moe_endpoint]
api_key = "fake"
[nvidia-nim-api]
api_key = "fake"
[demo]
api_key="12345"
[modellab_files]
token = "fake"
run: |
mkdir -p config
echo "$SECRETS_CONFIG" > config/secrets.toml
- name: Install poetry
run: pipx install "poetry == 1.8.5"
- name: Install dependencies
run: poetry lock && poetry install --no-interaction --with dev --extras all_plugins
- name: Lint formatting
run: poetry run black --check .
- name: Test with pytest
run: poetry run pytest
- name: Run mypy
run: poetry run mypy --follow-imports silent --exclude modelbench src/modelgauge