Skip to content

Commit 3743a7f

Browse files
committed
Initial attempt for e2e tests
- Add node code for e2e tests. This is a first take to try running these tests via actions. - Relates to #401
1 parent 8a23518 commit 3743a7f

17 files changed

+6844
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: e2e
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
e2e:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- nickname: win
14+
os: windows-2019
15+
graal: 22.0.0.2
16+
- nickname: macos
17+
os: macos-latest
18+
graal: 22.0.0.2
19+
- nickname: linux
20+
os: ubuntu-latest
21+
graal: 22.0.0.2
22+
name: CI Native ${{ matrix.nickname }}
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-java@v2
26+
with:
27+
distribution: adopt
28+
java-version: 11
29+
cache: maven
30+
- uses: graalvm/setup-graalvm@v1
31+
with:
32+
version: ${{ matrix.graal }}
33+
java-version: 11
34+
components: native-image
35+
set-java-home: false
36+
github-token: ${{ secrets.GITHUB_TOKEN }}
37+
- uses: actions/setup-node@v2
38+
with:
39+
node-version: '14'
40+
- run: |
41+
./mvnw clean package -Pnative
42+
- name: compile e2e module
43+
working-directory: e2e/spring-shell-e2e
44+
run: |
45+
npm install
46+
npm run build
47+
- name: run e2e tests
48+
working-directory: e2e/spring-shell-e2e-tests
49+
run: |
50+
npm install
51+
npm test

e2e/spring-shell-e2e-tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# dont care about typings
2+
types/
3+
4+
# for test data
5+
test/data/
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid",
10+
"parser": "typescript"
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
clearMocks: true,
3+
moduleFileExtensions: ['js', 'ts'],
4+
testEnvironment: 'node',
5+
testMatch: ['**/*.test.ts'],
6+
testRunner: 'jest-circus/runner',
7+
transform: {
8+
'^.+\\.ts$': 'ts-jest'
9+
},
10+
verbose: true,
11+
setupFilesAfterEnv: ['jest-extended', '@alex_neo/jest-expect-message']
12+
}

0 commit comments

Comments
 (0)