diff --git a/.github/workflows/on-merge-to-main.yml b/.github/workflows/on-merge-to-main.yml index c73d76f38b..cf77c847db 100644 --- a/.github/workflows/on-merge-to-main.yml +++ b/.github/workflows/on-merge-to-main.yml @@ -26,13 +26,19 @@ jobs: uses: actions/setup-node@v2 with: node-version: '14' + - name: Install npm@8.x + run: npm i -g npm@next-8 - name: "Setup npm" run: | npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" - - name: Install packages - run: | - npm ci - npm run lerna-ci + - name: Install monorepo packages + # This installs all the dependencies of ./packages/* + run: npm ci + - name: Install example packages + # Since we are not managing the cdk examples with npm workspaces we install + # the dependencies in a separate step + working-directory: ./examples/cdk + run: npm ci - name: Run lint run: npm run lerna-lint - name: Run tests diff --git a/.github/workflows/on-release-prod.yml b/.github/workflows/on-release-prod.yml index bfd723a160..8617482b5c 100644 --- a/.github/workflows/on-release-prod.yml +++ b/.github/workflows/on-release-prod.yml @@ -23,13 +23,19 @@ jobs: uses: actions/setup-node@v2 with: node-version: '14' + - name: Install npm@8.x + run: npm i -g npm@next-8 - name: "Setup npm" run: | npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" - - name: Install packages - run: | - npm ci - npm run lerna-ci + - name: Install monorepo packages + # This installs all the dependencies of ./packages/* + run: npm ci + - name: Install example packages + # Since we are not managing the cdk examples with npm workspaces we install + # the dependencies in a separate step + working-directory: ./examples/cdk + run: npm ci - name: Run lint run: npm run lerna-lint - name: Run tests diff --git a/.github/workflows/pr_lint_and_test.yml b/.github/workflows/pr_lint_and_test.yml index 3e842d2477..ec83c64f42 100644 --- a/.github/workflows/pr_lint_and_test.yml +++ b/.github/workflows/pr_lint_and_test.yml @@ -13,13 +13,19 @@ jobs: uses: actions/setup-node@v2 with: node-version: '14' + - name: Install npm@8.x + run: npm i -g npm@next-8 - name: "Setup npm" run: | npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" - - name: Install packages - run: | - npm ci - npm run lerna-ci + - name: Install monorepo packages + # This installs all the dependencies of ./packages/* + run: npm ci + - name: Install example packages + # Since we are not managing the cdk examples with npm workspaces we install + # the dependencies in a separate step + working-directory: ./examples/cdk + run: npm ci - name: Run lint run: npm run lerna-lint - name: Run tests diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 37f353353c..5afc96b187 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -23,10 +23,16 @@ jobs: uses: actions/setup-node@v2 with: node-version: '14' - - name: Install packages - run: | - npm ci - npm run lerna-ci + - name: Install npm@8.x + run: npm i -g npm@next-8 + - name: Install monorepo packages + # This installs all the dependencies of ./packages/* + run: npm ci + - name: Install example packages + # Since we are not managing the cdk examples with npm workspaces we install + # the dependencies in a separate step + working-directory: ./examples/cdk + run: npm ci - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1.6.1 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecb0326663..8c2ec1a78a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -127,7 +127,9 @@ First [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the ```console git clone https://github.com/{your-account}/aws-lambda-powertools-typescript.git cd aws-lambda-powertools-typescript -npm ci; npm run lerna-ci +npm ci; +cd examples/cdk; npm ci +cd ../.. npm run init-environment ``` diff --git a/package.json b/package.json index 6470b86942..cfe438dfbc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "test": "npm run lerna-test", "commit": "commit", "package": "npm run package", - "lerna-ci": "lerna exec -- npm ci", "lerna-test": "lerna exec -- npm run test", "lerna-test:e2e": "lerna exec -- npm run test:e2e", "lerna-package": "lerna exec -- npm run package", @@ -67,4 +66,4 @@ "dependencies": { "hosted-git-info": "^4.0.2" } -} +} \ No newline at end of file