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: run e2e on GitHub actions #2737

Merged
merged 2 commits into from
May 3, 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
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
3 changes: 2 additions & 1 deletion 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 Down
11 changes: 5 additions & 6 deletions packages/create-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@
"clean": "rimraf dist",
"lint": "eslint --ext .ts src --max-warnings 0",
"fix": "pnpm lint --fix",
"unittest": "jest --testPathIgnorePatterns=/__tests__/e2e\\.test\\.ts$",
"e2e": "cross-env NODE_ENV=e2e jest --testPathPattern=/__tests__/e2e\\.test\\.ts$",
"test": "pnpm unittest",
"test:all": "run-p test e2e",
"test:ci": "pnpm test:all",
"test:e2e": "cross-env NODE_ENV=e2e jest --config=jest.e2e.config.js"
"test": "jest --testPathIgnorePatterns=/__tests__/generator\\.test\\.ts$",
"test:generator": "cross-env NODE_ENV=e2e jest --testPathPattern=/__tests__/generator\\.test\\.ts$",
"test:ci": "pnpm test test:generator",
"test:e2e": "cross-env NODE_ENV=e2e jest --config=jest.e2e.config.js",
"test:all": "run-p test test:generator test:e2e"
},
"keywords": [
"kintone"
Expand Down