From f13693fcc1c56638e47fd6df25902b79848f8365 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi <dreamorosi@gmail.com> Date: Tue, 22 Feb 2022 14:50:35 +0000 Subject: [PATCH 1/3] chore: updated workflows & cleaned commands --- .github/workflows/on-merge-to-main.yml | 14 ++++++++++---- .github/workflows/on-release-prod.yml | 14 ++++++++++---- .github/workflows/pr_lint_and_test.yml | 14 ++++++++++---- .github/workflows/run-e2e-tests.yml | 14 ++++++++++---- package.json | 3 +-- 5 files changed, 41 insertions(+), 18 deletions(-) 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/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 From a08cc78ab923fd4db8bc6193b28433088a4f7dc7 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi <dreamorosi@gmail.com> Date: Tue, 22 Feb 2022 14:53:46 +0000 Subject: [PATCH 2/3] Updated CONTRIBUTING --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecb0326663..ae0ebaf493 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 ``` From 61bab22161e3a625c99669b457c2c49e90392042 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi <dreamorosi@gmail.com> Date: Wed, 23 Feb 2022 12:35:03 +0100 Subject: [PATCH 3/3] Update CONTRIBUTING.md Co-authored-by: ijemmy <ijemmy@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae0ebaf493..8c2ec1a78a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -129,7 +129,7 @@ git clone https://github.com/{your-account}/aws-lambda-powertools-typescript.git cd aws-lambda-powertools-typescript npm ci; cd examples/cdk; npm ci -cd ../ +cd ../.. npm run init-environment ```