Skip to content

Commit

Permalink
ci: run e2e on GitHub actions (#2737)
Browse files Browse the repository at this point in the history
  • Loading branch information
hung-cybo authored May 3, 2024
1 parent 48f51dd commit 34d542f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 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
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

0 comments on commit 34d542f

Please sign in to comment.