Skip to content

fix: Remove the requests package from the TypeScript SDK #1221

fix: Remove the requests package from the TypeScript SDK

fix: Remove the requests package from the TypeScript SDK #1221

Workflow file for this run

name: API Explorer CI
on:
pull_request:
paths:
- package.json
- packages/code-editor/**
- packages/run-it/**
- packages/api-explorer/**
- packages/extension-api-explorer/**
- packages/extension-utils/**
- .github/workflows/apix-ci.yml
push:
branches:
- main
paths:
- package.json
- packages/code-editor/**
- packages/run-it/**
- packages/api-explorer/**
- packages/extension-api-explorer/**
- packages/extension-utils/**
- .github/workflows/apix-ci.yml
workflow_dispatch:
env:
TS_JUNIT_OUTPUT_DIR: results/apix
jobs:
unit:
name: Unit - ${{ matrix.os }} / Node ${{ matrix.node-version }}
env:
JEST_JUNIT_OUTPUT_DIR: results/apix
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.os }}.apix${{ matrix.node-version }}.xml
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os:
- ubuntu
node-version: [22.x]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Repo Checkout
uses: actions/checkout@v4
- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
yarn
yarn lint:es --quiet
yarn lint:ts
yarn build
yarn dedupe:ci
# if this job fails before this point the required state check "APIX Tests"
# is never set, so we will set it manually.
- name: Report Failure
run: |
curl --request POST \
--url https://api.github.com/repos/looker-open-source/sdk-codegen/check-runs \
--header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--header "content-type: application/json" \
--header "Accept: application/vnd.github.v3+json" \
--data '{
"name": "APIX Tests",
"head_sha": "${{ github.event.pull_request.head.sha || github.sha }}",
"conclusion": "failure"
}' \
--fail
if: failure()
- name: Run unit tests
run: yarn test:apix --reporters=default --reporters=jest-junit
- name: Upload ts unit test results
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: apix-test-results
path: results/apix-${{ matrix.os }}-${{ matrix.node-version }}
publish-test-results:
needs: [unit]
if: success() || failure()
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
# Cosmetic issue with `check_name` being associated to the wrong
# workflow: https://github.com/EnricoMi/publish-unit-test-result-action/issues/12
check_name: APIX Tests
github_token: ${{ secrets.GITHUB_TOKEN }}
report_individual_runs: true
hide_comments: orphaned commits
check_run_annotations_branch: '*'
files: 'artifacts/apix-test-results*/*.xml'