Skip to content

OpenaAI API Key secret is added to Github Actions #65

OpenaAI API Key secret is added to Github Actions

OpenaAI API Key secret is added to Github Actions #65

Workflow file for this run

name: Development
on:
push:
branches:
- "main"
pull_request:
branches:
- "**"
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.12"
- "3.8"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install tox
- name: Run unit tests
run: |
python -m tox -e test-unit -- -m "smoke or sanity"
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.12", "3.8"]
env:
GUIDELLM__OPENAI__API_KEY: ${{secrets.openai-automation-token}}
steps:
- name: Authenticate to GCP
uses: google-github-actions/[email protected]
with:
project_id: ${{ secrets.GCP_PROJECT }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.NM_PYPI_SA }}
- name: Access OpenAI API Key from Secret Manager
run: |
echo "GUIDELLM__OPENAI__API_KEY=$(gcloud secrets versions access latest --secret=openai-automation-token)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: python -m pip install tox
- name: Run integration tests
run: python -m tox -e test-integration -- -m smoke
publish:
if: github.event_name == 'pull_request' || github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Build & Publish the distribution
needs: [unit-tests, integration-tests, e2e-tests]

Check failure on line 63 in .github/workflows/development.yml

View workflow run for this annotation

GitHub Actions / Development

Invalid workflow file

The workflow is not valid. .github/workflows/development.yml (Line: 63, Col: 44): Job 'publish' depends on unknown job 'e2e-tests'.
runs-on: ubuntu-latest
env:
GUIDELLM_BUILD_TYPE: dev
GUIDELLM_BUILD_NUMBER: ${{ github.event.pull_request.number || github.run_number }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Build and Publish Candidate Release
uses: neuralmagic/nm-actions/actions/publish_pypi@main
with:
publish_pypi: false
publish_pypi_internal: true