Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Live smoke-test credentials (copy to .env - gitignored - and fill in).
# `make smoke*` sources .env when present. Never point this at a production
# account, organization or project.
# account.
#
# TODO(template): one line per variable the provider reads, named exactly as
# the vendor's Terraform provider names them (unless Terraform only offers
# TF_VAR_* names, then the vendor CLI's). Never a real value.
# TypeSafe has no Terraform provider, so the names follow the vendor's SDKs
# and CLI examples (TYPESAFE_API_KEY is the variable `typesafe-sdk`,
# `@typesafe-ai/sdk` and every docs.typesafe.ai curl example read).

# API credential the provider authenticates with (see provider_config.json).
MYPROVIDER_API_TOKEN=...
# The API key the provider authenticates with (Authorization: Bearer). Create
# one at https://console.typesafe.ai/keys (early access is behind a waitlist
# at https://typesafe.ai). The same key reads the models catalog and runs
# System One evaluations; there is no separate admin key class.
TYPESAFE_API_KEY=...

# The tenant / organization / project the smoke suite runs against. Resolves
# the scoping server variable (x-stackQL-envVar in servers.json) so scoped
# queries need no WHERE clause. Delete if the API has no scoping variable.
MYPROVIDER_ORG_ID=...
# No scoping variable: the API is a fixed host (https://api.typesafe.ai)
# with no organization, project or workspace path parameter.
28 changes: 14 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Description
Please include a summary of the changes and the related issue(s). Please also include relevant motivation and context.
## Checklist
Please make sure that the following criteria are met:
- [ ] The PR title is descriptive.
- [ ] I have starred the [stackql](https://github.com/stackql/stackql) repo and this repo.
## Additional Notes
Add any additional information or context that might help the reviewers.
## Description

Please include a summary of the changes and the related issue(s). Please also include relevant motivation and context.

## Checklist

Please make sure that the following criteria are met:

- [ ] The PR title is descriptive.
- [ ] I have starred the [stackql](https://github.com/stackql/stackql) repo and this repo.

## Additional Notes

Add any additional information or context that might help the reviewers.
18 changes: 8 additions & 10 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: build-and-test

# Build the myprovider provider from the pinned spec and run every
# Build the typesafe provider from the pinned spec and run every
# credential-free test layer on each push / PR; the live smoke suite runs
# only where the secrets are configured; a scheduled spec-drift job diffs the
# served spec against the pin and opens an issue when it moves (drift is
# expected and must be reviewed, never silent).
#
# TODO(template): set the secret names to the variables the provider reads.

on:
push:
Expand Down Expand Up @@ -101,15 +100,14 @@ jobs:

smoke:
# secret-gated live smoke suite against the dedicated dev account;
# skipped with a notice when the secrets are not configured (forks, PRs
# from outside). Never the expensive gated lifecycle - trigger that
# deliberately with `make smoke-gated-lifecycle`.
# skipped with a notice when the secret is not configured (forks, PRs
# from outside). The suite bills a handful of System One evaluations
# (well under one cent); there is no gated lifecycle in this API.
runs-on: ubuntu-latest
needs: build-and-test
if: github.event_name != 'pull_request' && github.event_name != 'schedule'
env:
MYPROVIDER_API_TOKEN: ${{ secrets.MYPROVIDER_API_TOKEN }}
MYPROVIDER_ORG_ID: ${{ secrets.MYPROVIDER_ORG_ID }}
TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }}
steps:
- uses: actions/checkout@v7

Expand All @@ -126,13 +124,13 @@ jobs:
run: npm ci

- name: Live smoke suite
if: env.MYPROVIDER_API_TOKEN != ''
if: env.TYPESAFE_API_KEY != ''
run: make smoke

- name: Live smoke skipped (no credentials)
if: env.MYPROVIDER_API_TOKEN == ''
if: env.TYPESAFE_API_KEY == ''
run: |
echo "::notice title=Live smoke suite skipped::MYPROVIDER_API_TOKEN secrets are not configured - the live smoke suite did not run. Credential-free coverage still ran via the mock-server integration suite."
echo "::notice title=Live smoke suite skipped::TYPESAFE_API_KEY secrets are not configured - the live smoke suite did not run. Credential-free coverage still ran via the mock-server integration suite."

spec-drift:
# Diff the served spec against the pin on a schedule and on demand, and
Expand Down
Loading
Loading