-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__test-action-dependencies-cache.yml
More file actions
67 lines (55 loc) · 1.86 KB
/
__test-action-dependencies-cache.yml
File metadata and controls
67 lines (55 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Internal - Tests for "dependencies-cache" action
on:
workflow_call:
permissions: {}
jobs:
test:
name: Test "dependencies-cache" (${{ matrix.working-directory }})
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
include:
- working-directory: tests/npm
package-manager: npm
- working-directory: tests/pnpm
package-manager: pnpm
- working-directory: tests/pnpm-package-manager
package-manager: pnpm
- working-directory: tests/yarn
package-manager: yarn
steps:
# jscpd:ignore-start
- name: Arrange - Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Arrange - Setup Node.js runtime
id: arrange-setup-node
uses: ./actions/setup-node
with:
working-directory: ${{ matrix.working-directory }}
- name: Arrange - Verify expected package manager
id: arrange-check-package-manager
run: |
if [[ "${{ steps.arrange-setup-node.outputs.run-script-command }}" != "${{ matrix.package-manager }}"* ]]; then
echo "Package manager is not ${{ matrix.package-manager }}"
exit 1
fi
# jscpd:ignore-end
- name: Act - Run "dependencies-cache" action
id: act-get-dependencies-cache
uses: ./actions/dependencies-cache
with:
working-directory: ${{ matrix.working-directory }}
dependencies: |
gatsby
jest
nx
prettier
storybook
unknown
- name: Assert - Check "dependencies-cache" configured cache
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const assert = require("assert");