Skip to content

Commit

Permalink
Merge pull request #204 from snyk/feat/add-node-tests-to-circleci
Browse files Browse the repository at this point in the history
feat: add tests for supported node versions
  • Loading branch information
ola magdziarek authored May 12, 2022
2 parents ab5ecd7 + 095075e commit 88c94b3
Showing 1 changed file with 24 additions and 184 deletions.
208 changes: 24 additions & 184 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ windows_defaults: &windows_defaults
executor:
name: win/default

test_matrix_unix: &test_matrix_unix
matrix:
parameters:
node_version: ['12', '16']
jdk_version: ['8.0.292.j9-adpt']
gradle_version: ['3.4.1', '4.10', '5.5', '6.2.1']
test_matrix_win: &test_matrix_win
matrix:
parameters:
node_version: ['12', '16']
jdk_version: ['8']
gradle_version: ['4.10', '5.5', '6.2.1']

commands:
install_deps:
description: Install dependencies
Expand Down Expand Up @@ -53,8 +66,12 @@ commands:
command: npm --version
install_gradle_windows:
description: Install gradle
parameters:
gradle_version:
type: string
default: ''
steps:
- run: choco install gradle --version=6.0
- run: choco install gradle --version=<< parameters.gradle_version >>
install_sdkman:
description: Install SDKMAN
steps:
Expand Down Expand Up @@ -108,7 +125,6 @@ jobs:
- run:
name: Run lint
command: npm run lint

test-windows:
<<: *defaults
<<: *windows_defaults
Expand All @@ -121,7 +137,8 @@ jobs:
node_version: << parameters.node_version >>
- install_jdk_windows:
jdk_version: << parameters.jdk_version >>
- install_gradle_windows
- install_gradle_windows:
gradle_version: << parameters.gradle_version >>
- install_deps
- show_node_version
- run:
Expand Down Expand Up @@ -172,195 +189,18 @@ workflows:
branches:
ignore:
- master

# UNIX tests
- test-unix:
name: Unix Tests for Gradle=6.0 JDK=13 Node=16
context: nodejs-install
gradle_version: '6.0'
jdk_version: '13.0.2.j9-adpt'
node_version: '16'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=6.0 JDK=13 Node=14
context: nodejs-install
gradle_version: '6.0'
jdk_version: '13.0.2.j9-adpt'
node_version: '14.17.6'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=6.0 JDK=13 Node=12
context: nodejs-install
gradle_version: '6.0'
jdk_version: '13.0.2.j9-adpt'
node_version: '12'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=6.0 JDK=12 Node=10
context: nodejs-install
gradle_version: '6.0'
jdk_version: '12.0.2.j9-adpt'
node_version: '10'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=6.0 JDK=11 Node=8
context: nodejs-install
gradle_version: '6.0'
jdk_version: '11.0.11.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=2.14 JDK=8 Node=8
context: nodejs-install
gradle_version: '2.14'
jdk_version: '8.0.292.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=3.4.1 JDK=8 Node=8
context: nodejs-install
gradle_version: '3.4.1'
jdk_version: '8.0.292.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=4.10.3 JDK=8 Node=8
context: nodejs-install
gradle_version: '4.10.3'
jdk_version: '8.0.292.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=4.10.3 JDK=11 Node=8
context: nodejs-install
gradle_version: '4.10.3'
jdk_version: '11.0.11.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=4.10.3 JDK=13 Node=8
context: nodejs-install
gradle_version: '4.10.3'
jdk_version: '13.0.2.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=5.3.1 JDK=8 Node=8
context: nodejs-install
gradle_version: '5.3.1'
jdk_version: '8.0.292.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=5.3.1 JDK=11 Node=8
context: nodejs-install
gradle_version: '5.3.1'
jdk_version: '11.0.11.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-unix:
name: Unix Tests for Gradle=5.6.4 JDK=12 Node=8
context: nodejs-install
gradle_version: '5.6.4'
jdk_version: '12.0.2.j9-adpt'
node_version: '8'
requires:
- Lint
filters:
branches:
ignore:
- master

# Windows
- test-windows:
name: Windows Tests for JDK=8 Node=8
context: nodejs-install
jdk_version: '8'
node_version: '8.17.0'
requires:
- Lint
filters:
branches:
ignore:
- master
- test-windows:
name: Windows Tests for JDK=8 Node=10
name: Test OS=Unix Node=<<matrix.node_version>> JDK=<<matrix.jdk_version>> Gradle=<<matrix.gradle_version>>
context: nodejs-install
jdk_version: '8'
node_version: '10.21.0'
requires:
- Lint
<<: *test_matrix_unix
filters:
branches:
ignore:
- master
- test-windows:
name: Windows Tests for JDK=8 Node=12
name: Test OS=Windows Node=<<matrix.node_version>> JDK=<<matrix.jdk_version>> Gradle=<<matrix.gradle_version>>
context: nodejs-install
jdk_version: '8'
node_version: '12.0.0'
requires:
- Lint
<<: *test_matrix_win
filters:
branches:
ignore:
Expand Down

0 comments on commit 88c94b3

Please sign in to comment.