diff --git a/buildspec.yml b/buildspec.yml index c62bd485c..3f8d21987 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -3,42 +3,46 @@ version: 0.2 batch: fast-fail: false build-list: - - identifier: testNodejsLatest - buildspec: codebuild/nodejs_latest.yml + - identifier: testNodejs20 + buildspec: codebuild/nodejs20.yml env: image: aws/codebuild/standard:5.0 - - identifier: testNodejs14 - buildspec: codebuild/nodejs14.yml + - identifier: testNodejs18 + buildspec: codebuild/nodejs18.yml env: image: aws/codebuild/standard:5.0 - identifier: testNodejs16 buildspec: codebuild/nodejs16.yml env: image: aws/codebuild/standard:5.0 - - identifier: testBrowser - buildspec: codebuild/browser.yml + - identifier: testBrowser18 + buildspec: codebuild/browser18.yml env: image: aws/codebuild/standard:5.0 - identifier: compliance buildspec: codebuild/compliance.yml env: image: aws/codebuild/standard:5.0 - - identifier: testVectorsNodejsLatest - buildspec: codebuild/test_vectors/nodejs_latest.yml + - identifier: testVectorsNodejs16 + buildspec: codebuild/test_vectors/nodejs16.yml env: variables: PUBLISH_LOCAL: "true" image: aws/codebuild/standard:5.0 - - identifier: testVectorsNodejs14 - buildspec: codebuild/test_vectors/nodejs14.yml + - identifier: testVectorsNodejs18 + buildspec: codebuild/test_vectors/nodejs18.yml env: + variables: + PUBLISH_LOCAL: "true" image: aws/codebuild/standard:5.0 - - identifier: testVectorsNodejs16 - buildspec: codebuild/test_vectors/nodejs16.yml + - identifier: testVectorsNodejs20 + buildspec: codebuild/test_vectors/nodejs20.yml env: + variables: + PUBLISH_LOCAL: "true" image: aws/codebuild/standard:5.0 - - identifier: testVectorsBrowser - buildspec: codebuild/test_vectors/browser.yml + - identifier: testVectorsBrowser18 + buildspec: codebuild/test_vectors/browser18.yml env: variables: PUBLISH_LOCAL: "true" diff --git a/codebuild/browser.yml b/codebuild/browser18.yml similarity index 100% rename from codebuild/browser.yml rename to codebuild/browser18.yml diff --git a/codebuild/nodejs14.yml b/codebuild/nodejs18.yml similarity index 74% rename from codebuild/nodejs14.yml rename to codebuild/nodejs18.yml index ffa3816b4..6b43b4055 100644 --- a/codebuild/nodejs14.yml +++ b/codebuild/nodejs18.yml @@ -6,11 +6,14 @@ env: phases: install: - runtime-versions: - nodejs: 14 commands: + - n 18 + - node -v + - npm -v - npm ci --unsafe-perm - npm run build build: commands: + - npm -v + - node -v - npm run coverage-node diff --git a/codebuild/nodejs_latest.yml b/codebuild/nodejs20.yml similarity index 95% rename from codebuild/nodejs_latest.yml rename to codebuild/nodejs20.yml index e63722902..dc597a082 100644 --- a/codebuild/nodejs_latest.yml +++ b/codebuild/nodejs20.yml @@ -7,7 +7,7 @@ env: phases: install: commands: - - n 18 + - n 20 - node --version ; npm --version - npm ci --unsafe-perm - npm run build diff --git a/codebuild/release/prod-release.yml b/codebuild/release/prod-release.yml index 9a22529ef..3046d8803 100644 --- a/codebuild/release/prod-release.yml +++ b/codebuild/release/prod-release.yml @@ -9,22 +9,22 @@ batch: buildspec: codebuild/compliance.yml # Unit Tests - - identifier: testNodejsLatest - buildspec: codebuild/nodejs_latest.yml + - identifier: testNodejs20 + buildspec: codebuild/nodejs20.yml env: image: aws/codebuild/standard:5.0 - - identifier: testBrowser - buildspec: codebuild/browser.yml + - identifier: testBrowser18 + buildspec: codebuild/browser18.yml # Integration Tests - - identifier: testVectorsNodejsLatest - buildspec: codebuild/test_vectors/nodejs_latest.yml + - identifier: testVectorsNodejs20 + buildspec: codebuild/test_vectors/nodejs20.yml env: variables: PUBLISH_LOCAL: "true" image: aws/codebuild/standard:5.0 - - identifier: testVectorsBrowser - buildspec: codebuild/test_vectors/browser.yml + - identifier: testVectorsBrowser18 + buildspec: codebuild/test_vectors/browser18.yml env: variables: PUBLISH_LOCAL: "true" @@ -34,10 +34,10 @@ batch: - identifier: version depend-on: - compliance - - testNodejsLatest - - testBrowser - - testVectorsNodejsLatest - - testVectorsBrowser + - testNodejs20 + - testBrowser18 + - testVectorsNodejs20 + - testVectorsBrowser18 buildspec: codebuild/release/version.yml # Publish the release to npm @@ -50,7 +50,7 @@ batch: - identifier: validateNodejs depend-on: - publish - buildspec: codebuild/test_vectors/nodejs_latest.yml + buildspec: codebuild/test_vectors/nodejs20.yml env: variables: PUBLISH_LOCAL: "false" @@ -58,7 +58,7 @@ batch: - identifier: validateBrowser depend-on: - publish - buildspec: codebuild/test_vectors/browser.yml + buildspec: codebuild/test_vectors/browser18.yml env: variables: PUBLISH_LOCAL: "false" diff --git a/codebuild/test_vectors/browser.yml b/codebuild/test_vectors/browser18.yml similarity index 94% rename from codebuild/test_vectors/browser.yml rename to codebuild/test_vectors/browser18.yml index 741ba9ae6..4ae2a8e97 100644 --- a/codebuild/test_vectors/browser.yml +++ b/codebuild/test_vectors/browser18.yml @@ -9,7 +9,7 @@ phases: install: commands: - n 18 - - npm ci + - npm ci --unsafe-perm - |- if [ "$PUBLISH_LOCAL" = "true" ]; then npm run build diff --git a/codebuild/test_vectors/nodejs12.yml b/codebuild/test_vectors/nodejs12.yml deleted file mode 100644 index 2660804c2..000000000 --- a/codebuild/test_vectors/nodejs12.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 0.2 - -env: - variables: - NODE_OPTIONS: "--max-old-space-size=4096" - NPM_CONFIG_UNSAFE_PERM: true - -phases: - install: - runtime-versions: - nodejs: 12 - commands: - - npm ci - - npm run build - build: - commands: - - npm run verdaccio-publish - - npm run verdaccio-node-decrypt - - npm run verdaccio-node-encrypt diff --git a/codebuild/test_vectors/nodejs14.yml b/codebuild/test_vectors/nodejs14.yml deleted file mode 100644 index 551ad6fc2..000000000 --- a/codebuild/test_vectors/nodejs14.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 0.2 - -env: - variables: - NODE_OPTIONS: "--max-old-space-size=4096" - NPM_CONFIG_UNSAFE_PERM: true - -phases: - install: - runtime-versions: - nodejs: 14 - commands: - - npm ci - - npm run build - build: - commands: - - npm run verdaccio-publish - - npm run verdaccio-node-decrypt - - npm run verdaccio-node-encrypt diff --git a/codebuild/test_vectors/nodejs16.yml b/codebuild/test_vectors/nodejs16.yml index 1a3ed3f0a..42e78f246 100644 --- a/codebuild/test_vectors/nodejs16.yml +++ b/codebuild/test_vectors/nodejs16.yml @@ -9,14 +9,17 @@ phases: install: commands: - n 16 - - node -v - - npm -v - npm ci --unsafe-perm - - npm run build + - |- + if [ "$PUBLISH_LOCAL" = "true" ]; then + npm run build + fi build: commands: - - npm -v - node -v - - npm run verdaccio-publish + - |- + if [ "$PUBLISH_LOCAL" = "true" ]; then + npm run verdaccio-publish + fi - npm run verdaccio-node-decrypt - npm run verdaccio-node-encrypt diff --git a/codebuild/test_vectors/nodejs_latest.yml b/codebuild/test_vectors/nodejs18.yml similarity index 91% rename from codebuild/test_vectors/nodejs_latest.yml rename to codebuild/test_vectors/nodejs18.yml index 5feacc26b..982c2b1b7 100644 --- a/codebuild/test_vectors/nodejs_latest.yml +++ b/codebuild/test_vectors/nodejs18.yml @@ -9,13 +9,14 @@ phases: install: commands: - n 18 - - npm ci + - npm ci --unsafe-perm - |- if [ "$PUBLISH_LOCAL" = "true" ]; then npm run build fi build: commands: + - node -v - |- if [ "$PUBLISH_LOCAL" = "true" ]; then npm run verdaccio-publish diff --git a/codebuild/test_vectors/nodejs20.yml b/codebuild/test_vectors/nodejs20.yml new file mode 100644 index 000000000..3a2657beb --- /dev/null +++ b/codebuild/test_vectors/nodejs20.yml @@ -0,0 +1,25 @@ +version: 0.2 + +env: + variables: + NODE_OPTIONS: "--max-old-space-size=4096" + NPM_CONFIG_UNSAFE_PERM: true + +phases: + install: + commands: + - n 20 + - npm ci --unsafe-perm + - |- + if [ "$PUBLISH_LOCAL" = "true" ]; then + npm run build + fi + build: + commands: + - node -v + - |- + if [ "$PUBLISH_LOCAL" = "true" ]; then + npm run verdaccio-publish + fi + - npm run verdaccio-node-decrypt + - npm run verdaccio-node-encrypt