-
-
Notifications
You must be signed in to change notification settings - Fork 57
71 lines (69 loc) · 1.98 KB
/
main.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
71
name: Lint, test and analyse
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
install_dependencies:
runs-on: ubuntu-latest
name: Install dependencies
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: docker compose run --rm builder composer install
- name: Cache installed dependencies
id: cache-composer-dependencies
uses: actions/cache/save@v4
with:
path: |
./vendor/
./composer.lock
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }}
linting:
needs: install_dependencies
runs-on: ubuntu-latest
name: Linting
steps:
- uses: actions/cache/restore@v4
name: Restore cached dependencies
with:
path: |
./vendor/
./composer.lock
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }}
- uses: actions/checkout@v4
- name: Run linting
run: docker compose run --rm builder composer test:lint
testing:
needs: install_dependencies
runs-on: ubuntu-latest
name: Testing
steps:
- uses: actions/cache/restore@v4
name: Restore cached dependencies
with:
path: |
./vendor/
./composer.lock
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }}
- uses: actions/checkout@v4
- name: Run testing
run: docker compose run --rm builder composer test:phpunit
analysis:
needs: install_dependencies
runs-on: ubuntu-latest
name: Analysis
steps:
- uses: actions/cache/restore@v4
name: Restore cached dependencies
with:
path: |
./vendor/
./composer.lock
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }}
- uses: actions/checkout@v4
- name: Run analysis
run: docker compose run --rm builder composer test:phpstan