File tree 2 files changed +18
-6
lines changed 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 7
7
value : ${{ jobs.compute.outputs.os }}
8
8
coverage :
9
9
value : ${{ jobs.compute.outputs.coverage }}
10
+ major :
11
+ value : ${{ jobs.compute.outputs.major }}
10
12
php :
11
13
value : ${{ jobs.compute.outputs.php }}
12
14
exclude :
31
33
exclude : ${{ env.EXCLUDE }}
32
34
33
35
steps :
34
- - name : Pseudo step
35
- if : false
36
- run : echo
36
+ - name : Compute major versions
37
+ run : |
38
+ echo $COVERAGE
39
+ echo $COVERAGE | tr "," "\n"
40
+ echo $COVERAGE | tr "," "\n" | tr -cd "\n0-9"
41
+ echo $COVERAGE | tr "," "\n" | tr -cd "\n0-9" | sed "s/.\{2\}$//"
42
+ echo $COVERAGE | tr "," "\n" | tr -cd "\n0-9" | sed "s/.\{2\}$//" | sort -V
43
+ echo $COVERAGE | tr "," "\n" | tr -cd "\n0-9" | sed "s/.\{2\}$//" | sort -V | uniq
44
+ echo $COVERAGE | tr "," "\n" | tr -cd "\n0-9" | sed "s/.\{2\}$//" | sort -V | uniq | jq --raw-input --slurp 'split("\n") | map(select(. != ""))'
45
+ echo "major=$(echo $COVERAGE | tr "," "\n" | tr -cd "\n0-9" | sed "s/.\{2\}$//" | sort -V | uniq | jq --compact-output --raw-input --slurp 'split("\n") | map(select(. != ""))')" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -33,14 +33,17 @@ jobs:
33
33
id : version-cache
34
34
env :
35
35
COVERAGE : ${{ matrix.coverage }}
36
- run : echo "version=$(echo $COVERAGE | tr -d -c 0-9)" >> $GITHUB_OUTPUT
36
+ run : |
37
+ echo "version=$(echo $COVERAGE | tr -d -c 0-9)" >> $GITHUB_OUTPUT
38
+ echo "major=$(echo $COVERAGE | tr -d -c 0-9 | sed 's/.\{2\}$//')" >> $GITHUB_OUTPUT
37
39
38
40
- uses : actions/cache/restore@v4
39
41
id : restore-composer-cache
40
42
with :
41
43
path : ${{ steps.composer-cache.outputs.dir }}
42
- key : ${{ runner.os }}-${{ matrix.php }}-${{ matrix.coverage }}
44
+ key : ${{ runner.os }}-${{ matrix.php }}-${{ steps.version-cache.outputs.major }}-${{ matrix.coverage }}
43
45
restore-keys : |
46
+ ${{ runner.os }}-${{ matrix.php }}-${{ steps.version-cache.outputs.major }}-
44
47
${{ runner.os }}-${{ matrix.php }}-
45
48
${{ runner.os }}-
46
49
79
82
- name : Archive PHPUnit logs
80
83
uses : actions/upload-artifact@v4
81
84
with :
82
- name : phpunit-logs-${{ runner.os }}-${{ matrix.php }}-${{ matrix.coverage }}
85
+ name : phpunit-logs-${{ runner.os }}-${{ matrix.php }}-${{ steps.version-cache.outputs.major }}-${{ matrix.coverage }}
83
86
path : .Log/*
84
87
retention-days : 1
You can’t perform that action at this time.
0 commit comments