Skip to content

Commit

Permalink
test: merge from origin
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanphamcybozu committed May 6, 2024
2 parents da5f2c1 + 4f96f69 commit 93f6ff6
Show file tree
Hide file tree
Showing 28 changed files with 1,192 additions and 845 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test e2e

on:
push:
branches:
- master
pull_request:

jobs:
test-e2e:
name: Node.js ${{ matrix.os }} ${{ matrix.node-version }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- run: pnpm install --fetch-timeout 900000 --frozen-lockfile
- run: pnpm build
- run: pnpm test:e2e

actions-timeline:
needs: [test-e2e]
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
steps:
- uses: Kesin11/actions-timeline@b03a6aa289adef5534c84ccb6fbef7c975973574 # v2
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"packages/dts-gen": "8.0.10",
"packages/plugin-manifest-validator": "10.1.0",
"packages/plugin-packer": "8.0.5",
"packages/plugin-uploader": "9.0.6",
"packages/plugin-uploader": "9.0.7",
"packages/profile-loader": "5.0.1",
"packages/rest-api-client": "5.5.0",
"packages/rest-api-client": "5.5.1",
"packages/webpack-plugin-kintone-plugin": "8.0.7"
}
2 changes: 1 addition & 1 deletion examples/rest-api-client-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@kintone/profile-loader": "workspace:*",
"@kintone/rest-api-client": "^5.5.0",
"@kintone/rest-api-client": "^5.5.1",
"yargs": "^17.7.2"
},
"devDependencies": {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test:root": "jest",
"start": "pnpm build --watch",
"test": "pnpm test:root && pnpm -r --parallel run test",
"test:ci": "pnpm test:root && pnpm -r --stream run test:ci"
"test:ci": "pnpm test:root && pnpm -r --stream run test:ci",
"test:e2e": "pnpm -r --parallel run test:e2e"
},
"repository": {
"type": "git",
Expand All @@ -33,8 +34,8 @@
},
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.24.4",
"@babel/preset-env": "^7.24.4",
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",
"@cybozu/eslint-config": "^23.0.0",
"@cybozu/license-manager": "^1.2.1",
Expand All @@ -49,7 +50,7 @@
"rimraf": "^5.0.5",
"typescript": "^5.4.5"
},
"packageManager": "pnpm@8.15.7",
"packageManager": "pnpm@8.15.8",
"pnpm": {
"overrides": {
"follow-redirects@<1.15.4": ">=1.15.4",
Expand Down
21 changes: 21 additions & 0 deletions packages/create-plugin/JestCustomEnvironment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { TestEnvironment } = require("jest-environment-node");

class JestCustomEnvironment extends TestEnvironment {
handleTestEvent(event) {
if (event.name === "test_start") {
const testName = event.test.name;
console.log(`Running test: ${testName}`);
}

if (!this.global.testStatuses) {
this.global.testStatuses = {};
}

if (event.name === "test_fn_success") {
const testName = event.test.name;
this.global.testStatuses[testName] = "passed";
}
}
}

module.exports = JestCustomEnvironment;
Loading

0 comments on commit 93f6ff6

Please sign in to comment.