-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (75 loc) · 2.17 KB
/
Copy pathci.yml
File metadata and controls
90 lines (75 loc) · 2.17 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
pull_request:
concurrency:
group: ci-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
jobs:
resolve-tooling-image:
name: Resolve tooling image
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
php-image: ${{ steps.config.outputs.php-image }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Resolve tooling image from the Makefile
id: config
run: echo "php-image=$(make show-image)" >> "$GITHUB_OUTPUT"
build:
name: Build
needs: resolve-tooling-image
runs-on: ubuntu-latest
timeout-minutes: 15
env:
image: ${{ needs.resolve-tooling-image.outputs.php-image }}
workspace: /var/www/html
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Validate composer.json
run: docker run --rm -v "${PWD}":${{ env.workspace }} ${{ env.image }} composer validate --no-interaction
- name: Install dependencies
run: >
docker run --rm -v "${PWD}":${{ env.workspace }} ${{ env.image }}
composer install --no-progress --optimize-autoloader --prefer-dist --no-interaction
- name: Upload vendor and composer.lock as artifact
uses: actions/upload-artifact@v7
with:
name: vendor-artifact
path: |
vendor
composer.lock
auto-review:
name: Auto review
needs: [resolve-tooling-image, build]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Download vendor artifact from build
uses: actions/download-artifact@v8
with:
name: vendor-artifact
path: .
- name: Run review
run: make review
tests:
name: Tests
needs: [resolve-tooling-image, auto-review]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Download vendor artifact from build
uses: actions/download-artifact@v8
with:
name: vendor-artifact
path: .
- name: Run tests
run: make tests