Skip to content

Commit 7ee88fa

Browse files
committed
feat(yaml-parser): remove actions/cache id path is ~/.npm
* test(yaml-parser): add coverage for actions/cache remove step
1 parent 0cc5d83 commit 7ee88fa

File tree

13 files changed

+301
-14
lines changed

13 files changed

+301
-14
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/cache@v1
14+
with:
15+
path: ~/.npm
16+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
17+
restore-keys: |
18+
${{ runner.os }}-node-
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npx semantic-release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.PROBOTBOT_NPM_TOKEN }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/cache@v1
14+
with:
15+
path: ~/.npm
16+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
17+
restore-keys: |
18+
${{ runner.os }}-node-
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npx semantic-release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.PROBOTBOT_NPM_TOKEN }}

tests/utils/github-action-fixtures/pending-to-add-cache/example2/actual.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ jobs:
1717
with:
1818
node-version: ${{ matrix.node-version }}
1919

20-
- name: Cache node_modules
21-
id: cache-node_modules
22-
uses: actions/cache@v2
23-
with:
24-
path: node_modules
25-
key: node_modules-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
26-
2720
- name: npm ci
2821
if: steps.cache-node_modules.outputs.cache-hit != 'true'
2922
run: npm ci

tests/utils/github-action-fixtures/pending-to-add-cache/example2/expected.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ jobs:
1818
node-version: ${{ matrix.node-version }}
1919
cache: npm
2020

21-
- name: Cache node_modules
22-
id: cache-node_modules
23-
uses: actions/cache@v2
24-
with:
25-
path: node_modules
26-
key: node_modules-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
27-
2821
- name: npm ci
2922
if: steps.cache-node_modules.outputs.cache-hit != 'true'
3023
run: npm ci

tests/utils/github-action-fixtures/pending-to-add-cache/not-remove-actions-cache-step-node_modules/actual.yml

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/utils/github-action-fixtures/pending-to-add-cache/not-remove-actions-cache-step-node_modules/expected.yml

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: "12.x"
16+
- uses: actions/cache@v1
17+
with:
18+
path: ~/.npm
19+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
20+
restore-keys: |
21+
${{ runner.os }}-node-
22+
- run: npm ci
23+
- run: npm run build
24+
- run: npx semantic-release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.PROBOTBOT_NPM_TOKEN }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "12.x"
16+
cache: npm
17+
- run: npm ci
18+
- run: npm run build
19+
- run: npx semantic-release
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
NPM_TOKEN: ${{ secrets.PROBOTBOT_NPM_TOKEN }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "12.x"
16+
- uses: actions/cache@v1
17+
with:
18+
path: ~/.npm
19+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
20+
restore-keys: |
21+
${{ runner.os }}-node-
22+
- run: npm ci
23+
- run: npm run build
24+
- run: npx semantic-release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.PROBOTBOT_NPM_TOKEN }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "12.x"
16+
cache: npm
17+
- run: npm ci
18+
- run: npm run build
19+
- run: npx semantic-release
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
NPM_TOKEN: ${{ secrets.PROBOTBOT_NPM_TOKEN }}

0 commit comments

Comments
 (0)