improvement: add literal example type and add id to example #3425
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
paths: | |
- "packages/**" | |
# IR snapshot tests run on test definitions | |
- "test-definitions/**" | |
# Add any generators that are written in TypeScript | |
- "generators/openapi/**" | |
- "generators/postman/**" | |
- "generators/ruby/**" | |
- "generators/typescript/**" | |
- "generators/csharp/**" | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "packages/**" | |
# IR snapshot tests run on test definitions | |
- "test-definitions/**" | |
# Add any generators that are written in TypeScript | |
- "generators/openapi/**" | |
- "generators/postman/**" | |
- "generators/ruby/**" | |
- "generators/typescript/**" | |
- "generators/csharp/**" | |
branches: | |
- main | |
# Cancel previous workflows on previous push | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: Lint Monorepo | |
run: yarn lint:monorepo | |
- name: Check dependencies | |
run: yarn depcheck | |
- name: Lint | |
run: yarn lint:style | |
- name: generate (dev) JSON Schema | |
run: yarn generate-json-schema:dev | |
- name: Format | |
run: yarn format:check | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
compile: | |
runs-on: CLI | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: compile | |
run: yarn compile | |
eslint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: lint:eslint | |
run: yarn lint:eslint | |
test: | |
runs-on: Test | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: Run tests | |
run: yarn test --maxWorkers 15 --ci --silent | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
ete-tests: | |
runs-on: CLI | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: Run ETE tests | |
env: | |
FERN_ORG_TOKEN_DEV: ${{ secrets.FERN_ORG_TOKEN_DEV }} | |
run: | | |
FERN_TOKEN=${{ secrets.FERN_ORG_TOKEN_DEV }} yarn test:ete | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
live-test-dev: | |
environment: Fern Dev | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "yarn" | |
- name: Install | |
run: yarn install | |
- name: Check API definition is valid | |
env: | |
FORCE_COLOR: "2" | |
FERN_ORG_TOKEN_DEV: ${{ secrets.FERN_ORG_TOKEN_DEV }} | |
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }} | |
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} | |
run: | | |
yarn workspace @fern-api/cli dist:cli:dev | |
cli_path="$(yarn workspace @fern-api/cli bin fern:dev)" | |
./scripts/live-test.sh "$cli_path" "$FERN_ORG_TOKEN_DEV" |