Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/add workflow #42

Merged
merged 4 commits into from
Nov 18, 2024
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
37 changes: 37 additions & 0 deletions .github/workflows/build-test-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setting up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Enabling pre-post scripts
run: pnpm config set enable-pre-post-scripts true
- run: pnpm install
- run: pnpm lint
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm build
- run: pnpm test:coverage
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pnpm-lock.yaml
spec/kinde-mgmt-api-specs.yaml
spec/kinde-mgmt-api-specs.yaml
renovate.json
140 changes: 140 additions & 0 deletions lib/main.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
import { describe, it, expect } from "vitest";

import * as main from "./main";

describe("main.ts exports", () => {
it("should not export anything extra", () => {
const actualExports = Object.keys(main);

const expectedExports = [
// types
"$add_organization_users_response",
"$api_result",
"$applications",
"$authorize_app_api_response",
"$category",
"$connected_apps_access_token",
"$connected_apps_auth_url",
"$connection",
"$create_apis_response",
"$create_application_response",
"$create_category_response",
"$create_connection_response",
"$create_environment_variable_response",
"$create_identity_response",
"$create_organization_response",
"$create_property_response",
"$create_roles_response",
"$create_subscriber_success_response",
"$create_user_response",
"$create_webhook_response",
"$delete_api_response",
"$delete_environment_variable_response",
"$delete_webhook_response",
"$environment_variable",
"$error",
"$error_response",
"$event_type",
"$get_api_response",
"$get_apis_response",
"$get_application_response",
"$get_applications_response",
"$get_business_response",
"$get_categories_response",
"$get_connections_response",
"$get_environment_feature_flags_response",
"$get_environment_variable_response",
"$get_environment_variables_response",
"$get_event_response",
"$get_event_types_response",
"$get_identities_response",
"$get_industries_response",
"$get_organization_feature_flags_response",
"$get_organization_response",
"$get_organization_users_response",
"$get_organizations_response",
"$get_organizations_user_permissions_response",
"$get_organizations_user_roles_response",
"$get_permissions_response",
"$get_properties_response",
"$get_property_values_response",
"$get_redirect_callback_urls_response",
"$get_role_response",
"$get_roles_response",
"$get_subscriber_response",
"$get_subscribers_response",
"$get_timezones_response",
"$get_webhooks_response",
"$identity",
"$logout_redirect_urls",
"$not_found_response",
"$organization_item_schema",
"$organization_user",
"$organization_user_permission",
"$organization_user_role",
"$organization_user_role_permissions",
"$organization_users",
"$permissions",
"$property",
"$property_value",
"$redirect_callback_urls",
"$role",
"$role_permissions_response",
"$roles",
"$subscriber",
"$subscribers_subscriber",
"$success_response",
"$token_error_response",
"$token_introspect",
"$update_environment_variable_response",
"$update_organization_users_response",
"$update_role_permissions_response",
"$update_user_response",
"$update_webhook_response",
"$user",
"$user_identity",
"$user_profile_v2",
"$users",
"$users_response",
"$webhook",
"ApIs",
"ApiError",
"Applications",
"Business",
"Callbacks",
"CancelError",
"CancelablePromise",
"ConnectedApps",
"Connections",
"EnvironmentVariables",
"Environments",
"FeatureFlags",
"Identities",
"Industries",
"Oauth",
"OpenAPI",
"Organizations",
"Permissions",
"Properties",
"PropertyCategories",
"Roles",
"Subscribers",
"Timezones",
"Users",
"Webhooks",

// utils
"checkAudience",
"getToken",
"jwtDecode",
"jwtDecoder",
"setToken",
"validateToken",

// init
"init",
];

expect(actualExports.sort()).toEqual(expectedExports.sort());
});
});
Loading