[APO-2825] Add codegen test for state variables in inline subworkflow nodes #10858
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: ci-codegen | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| workflow_dispatch: | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18.18.0" | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: ee/codegen | |
| - name: Format | |
| run: npm run format:check | |
| working-directory: ee/codegen | |
| - name: Lint | |
| run: npm run lint | |
| working-directory: ee/codegen | |
| - name: Compile | |
| run: npm run types | |
| working-directory: ee/codegen | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18.17.0" | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: ee/codegen | |
| # Needed to get file merging tests to pass | |
| - name: Set up python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.9 | |
| - name: Bootstrap poetry | |
| run: make setup-poetry | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Test | |
| run: npm test | |
| working-directory: ee/codegen | |
| publish: | |
| permissions: | |
| contents: "read" | |
| id-token: "write" | |
| needs: [compile, test] | |
| if: (github.event_name == 'push' && contains(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18.17.0" | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: ee/codegen | |
| - name: Build | |
| run: npm run build | |
| working-directory: ee/codegen | |
| - id: auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| token_format: "access_token" | |
| create_credentials_file: true | |
| workload_identity_provider: "projects/585775334980/locations/global/workloadIdentityPools/github-pool/providers/github-actions-provider" | |
| service_account: "github-gcr-service-account@vocify-prod.iam.gserviceaccount.com" | |
| access_token_lifetime: "1200s" | |
| - name: Publish | |
| env: | |
| GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }} | |
| run: | | |
| npm config set @vellum-ai:registry https://us-central1-npm.pkg.dev/vocify-prod/vellum-private-npm/ | |
| npm run gar-login | |
| npm publish | |
| working-directory: ee/codegen | |
| upgrade-codegen-service: | |
| permissions: | |
| contents: "read" | |
| id-token: "write" | |
| needs: [publish] | |
| if: (github.event_name == 'push' && contains(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20.19.3" | |
| - id: auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| token_format: "access_token" | |
| create_credentials_file: true | |
| workload_identity_provider: "projects/585775334980/locations/global/workloadIdentityPools/github-pool/providers/github-actions-provider" | |
| service_account: "github-gcr-service-account@vocify-prod.iam.gserviceaccount.com" | |
| access_token_lifetime: "1200s" | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ee/codegen | |
| - name: Upgrade codegen-service | |
| env: | |
| VELLUM_AUTOMATION_APP_ID: ${{ secrets.VELLUM_AUTOMATION_APP_ID }} | |
| VELLUM_AUTOMATION_PRIVATE_KEY: ${{ secrets.VELLUM_AUTOMATION_PRIVATE_KEY }} | |
| VELLUM_AUTOMATION_INSTALLATION_ID: ${{ secrets.VELLUM_AUTOMATION_INSTALLATION_ID }} | |
| GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }} | |
| run: | | |
| npm config set @vellum-ai:registry https://us-central1-npm.pkg.dev/vocify-prod/vellum-private-npm/ | |
| npm run upgrade-codegen-service | |
| working-directory: ee/codegen |