-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.29 KB
/
test.yml
File metadata and controls
42 lines (35 loc) · 1.29 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
name: test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create test folder
run: |
mkdir test
mkdir test2
- name: Create package.json with different versions
run: |
echo '{"name": "my-package", "version": "1.0.0","test": 1}' > test2/other_name.json
echo '{"name": "my-package", "version": "1.0.0","test": 1}' > test2/other_name-lock.json
echo '{"name": "my-package", "version": "1.2.0","test": 1}' > test/package.json
echo '{"name": "my-package", "version": "1.2.0","test": 1}' > test/package-lock.json
- name: simple without version
uses: ./
id: simpleWithoutVersion
with:
packageJSON: test/package.json
packageLockJSON: test/package-lock.json
- name: diff without version
uses: ./
id: diffWithoutVersion
with:
packageJSON: test2/other_name.json
packageLockJSON: test2/other_name-lock.json
- name: test
if: steps.simpleWithoutVersion.outputs.cacheKey != steps.diffWithoutVersion.outputs.cacheKey
run: |
echo "Received different cache keys for lock files "
echo ${{steps.simpleWithoutVersion.outputs.cacheKey}} ${{steps.diffWithoutVersion.outputs.cacheKey}}
exit 1