-
Notifications
You must be signed in to change notification settings - Fork 13
65 lines (59 loc) · 2.25 KB
/
integrity-check.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
name: "[workflow call] Check integrity of given mirror repo"
on:
workflow_call:
inputs:
repo:
description: 'The composer repository url'
required: true
type: string
secrets:
COMPOSER_AUTH:
required: true
jobs:
compute-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: mage-os/github-actions/supported-version@main
with:
kind: all
id: supported-version
integrity-check:
name: ${{ matrix.magento }}
needs: [compute-matrix]
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.compute-matrix.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create MageOS ${{ matrix.magento }} Project
uses: ./.github/actions/checkout-magento
with:
repository-url: ${{ inputs.repo }}
install-directory: ${{ github.workspace }}/mageos
magento-version: ${{ matrix.magento }}
composer-version: ${{ matrix.composer }}
composer-auth: ${{ secrets.COMPOSER_AUTH }}
php-version: ${{ matrix.php }}
sample-data: 'true'
- name: Create Magento ${{ matrix.magento }} Project
uses: ./.github/actions/checkout-magento
with:
repository-url: 'https://repo.magento.com/'
install-directory: ${{ github.workspace }}/magento
magento-version: ${{ matrix.magento }}
composer-version: ${{ matrix.composer }}
composer-auth: ${{ secrets.COMPOSER_AUTH }}
php-version: ${{ matrix.php }}
sample-data: 'true'
# Integrity checks
- run: node src/integrity-test/validate-package-versions-match.js ${{ github.workspace }}/mageos/vendor ${{ github.workspace }}/magento/vendor
name: Package Versions Validate
# Ignore composer.json, composer.log, generated composer autoload files and files in var/cache that start with `mage---`
- run: diff -rq -x "*composer*" -x "*autoload*" -x "*mage---*" -x ".git" ${{ github.workspace }}/magento ${{ github.workspace }}/mageos
if: always()
name: Files Integrity Check