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

Small bug fixes, refactors in workflow invocation based on Danny's tests #14054

Merged
merged 18 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 16 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
28 changes: 28 additions & 0 deletions .github/workflows/pipedream-sdk-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run SDK Tests

on:
pull_request:
types: [opened, edited, synchronize]
paths:
- 'packages/sdk/**'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install
working-directory: packages/sdk

- name: Run tests
run: npm test
working-directory: packages/sdk
28 changes: 28 additions & 0 deletions packages/sdk/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
setupFiles: [
"<rootDir>/jest.setup.js",
],
roots: [
"<rootDir>/src",
],
testMatch: [
"**/__tests__/**/*.ts",
"**/?(*.)+(spec|test).ts",
],
moduleFileExtensions: [
"ts",
"js",
],
transform: {
// '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "tsconfig.node.json",
},
],
},
};
3 changes: 3 additions & 0 deletions packages/sdk/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const fetchMock = require("jest-fetch-mock");
fetchMock.enableMocks();
global.fetch = fetchMock;
Loading
Loading