-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 2.18 KB
/
test-file-hashes.yml
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
68
69
70
name: "Test file hashes"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
DynamicVersionMatrix:
name: Dynamic version matrix
runs-on: ubuntu-latest
outputs:
matrix: '[
{ tag: "${{ steps.etherpad-version-cleaned.outputs.version }}", expected: "${{ steps.etherpad-version-cleaned.outputs.version }}" },
{ tag: "2.2.2", expected: "2.2.2" },
{ tag: "2.1.0", expected: "2.1.0" },
{ tag: "2.0.2", expected: "2.0.2" },
{ tag: "2.0.0", expected: "2.0.0" },
{ tag: "1.9.7", expected: "1.9.7" },
{ tag: "1.8.18", expected: "1.8.18" },
{ tag: "1.8.5", expected: "1.8.5" },
{ tag: "1.8.0", expected: "1.8.0" },
{ tag: "1.7.5", expected: "1.7.5" }
]'
version: ${{ steps.etherpad-version-cleaned.outputs.version }}
steps:
- id: etherpad
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ether/etherpad-lite
- id: etherpad-version-cleaned
run: |
LATEST_RELEASE=${{ steps.etherpad.outputs.release }}
CLEANED_VERSION="${LATEST_RELEASE//v/}"
echo "version=$CLEANED_VERSION" >> "$GITHUB_OUTPUT"
TestFileHashes:
name: Docker [${{ matrix.versions.tag }}]
runs-on: ubuntu-latest
needs: DynamicVersionMatrix
services:
etherpad:
image: etherpad/etherpad:${{ matrix.versions.tag }}
ports:
- 9001:9001
strategy:
matrix:
versions: ${{ fromJSON(needs.DynamicVersionMatrix.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Scan etherpad instance for file hashes
run: bin/console.php ether:check-file-hashes http://localhost:9001 ${{ matrix.versions.expected }}