Skip to content

Commit a07f864

Browse files
dreamorosiijemmy
andauthored
chore: update actions to npm8 (#570)
* chore: updated workflows & cleaned commands * Updated CONTRIBUTING * Update CONTRIBUTING.md Co-authored-by: ijemmy <ijemmy@users.noreply.github.com> Co-authored-by: ijemmy <ijemmy@users.noreply.github.com>
1 parent 04caf46 commit a07f864

File tree

6 files changed

+44
-19
lines changed

6 files changed

+44
-19
lines changed

.github/workflows/on-merge-to-main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,19 @@ jobs:
2626
uses: actions/setup-node@v2
2727
with:
2828
node-version: '14'
29+
- name: Install npm@8.x
30+
run: npm i -g npm@next-8
2931
- name: "Setup npm"
3032
run: |
3133
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
32-
- name: Install packages
33-
run: |
34-
npm ci
35-
npm run lerna-ci
34+
- name: Install monorepo packages
35+
# This installs all the dependencies of ./packages/*
36+
run: npm ci
37+
- name: Install example packages
38+
# Since we are not managing the cdk examples with npm workspaces we install
39+
# the dependencies in a separate step
40+
working-directory: ./examples/cdk
41+
run: npm ci
3642
- name: Run lint
3743
run: npm run lerna-lint
3844
- name: Run tests

.github/workflows/on-release-prod.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@ jobs:
2323
uses: actions/setup-node@v2
2424
with:
2525
node-version: '14'
26+
- name: Install npm@8.x
27+
run: npm i -g npm@next-8
2628
- name: "Setup npm"
2729
run: |
2830
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
29-
- name: Install packages
30-
run: |
31-
npm ci
32-
npm run lerna-ci
31+
- name: Install monorepo packages
32+
# This installs all the dependencies of ./packages/*
33+
run: npm ci
34+
- name: Install example packages
35+
# Since we are not managing the cdk examples with npm workspaces we install
36+
# the dependencies in a separate step
37+
working-directory: ./examples/cdk
38+
run: npm ci
3339
- name: Run lint
3440
run: npm run lerna-lint
3541
- name: Run tests

.github/workflows/pr_lint_and_test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ jobs:
1313
uses: actions/setup-node@v2
1414
with:
1515
node-version: '14'
16+
- name: Install npm@8.x
17+
run: npm i -g npm@next-8
1618
- name: "Setup npm"
1719
run: |
1820
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
19-
- name: Install packages
20-
run: |
21-
npm ci
22-
npm run lerna-ci
21+
- name: Install monorepo packages
22+
# This installs all the dependencies of ./packages/*
23+
run: npm ci
24+
- name: Install example packages
25+
# Since we are not managing the cdk examples with npm workspaces we install
26+
# the dependencies in a separate step
27+
working-directory: ./examples/cdk
28+
run: npm ci
2329
- name: Run lint
2430
run: npm run lerna-lint
2531
- name: Run tests

.github/workflows/run-e2e-tests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ jobs:
2323
uses: actions/setup-node@v2
2424
with:
2525
node-version: '14'
26-
- name: Install packages
27-
run: |
28-
npm ci
29-
npm run lerna-ci
26+
- name: Install npm@8.x
27+
run: npm i -g npm@next-8
28+
- name: Install monorepo packages
29+
# This installs all the dependencies of ./packages/*
30+
run: npm ci
31+
- name: Install example packages
32+
# Since we are not managing the cdk examples with npm workspaces we install
33+
# the dependencies in a separate step
34+
working-directory: ./examples/cdk
35+
run: npm ci
3036
- name: Configure AWS credentials
3137
uses: aws-actions/configure-aws-credentials@v1.6.1
3238
with:

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ First [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the
133133
```console
134134
git clone https://github.com/{your-account}/aws-lambda-powertools-typescript.git
135135
cd aws-lambda-powertools-typescript
136-
npm ci; npm run lerna-ci
136+
npm ci;
137+
cd examples/cdk; npm ci
138+
cd ../..
137139
npm run init-environment
138140
```
139141

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"test": "npm run lerna-test",
1313
"commit": "commit",
1414
"package": "npm run package",
15-
"lerna-ci": "lerna exec -- npm ci",
1615
"lerna-test": "lerna exec -- npm run test",
1716
"lerna-test:e2e": "lerna exec -- npm run test:e2e",
1817
"lerna-package": "lerna exec -- npm run package",
@@ -67,4 +66,4 @@
6766
"dependencies": {
6867
"hosted-git-info": "^4.0.2"
6968
}
70-
}
69+
}

0 commit comments

Comments
 (0)