-
Notifications
You must be signed in to change notification settings - Fork 10
100 lines (81 loc) · 1.95 KB
/
ci.yml
File metadata and controls
100 lines (81 loc) · 1.95 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
91
92
93
94
95
96
97
98
99
100
name: Atlas.Query CI
on:
push:
paths-ignore:
- '**.md'
- '**.txt'
pull_request:
paths-ignore:
- '**.md'
- '**.txt'
workflow_dispatch:
env:
fail-fast: true
# PHP extensions required by Composer
EXTENSIONS: pdo
permissions:
contents: read
jobs:
# PHPStan
quality:
name: "Validate Quality"
if: "!contains(github.event.head_commit.message, 'ci skip')"
permissions:
contents: read
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
php:
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@2.35.3
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.EXTENSIONS }}
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install development dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-dist"
- name: "PHPStan"
run: |
composer stan
unit-tests:
needs: quality
permissions:
contents: read # to fetch code (actions/checkout)
name: Unit tests / PHP-${{ matrix.php }}
runs-on: ubuntu-22.04
strategy:
matrix:
php:
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@2.35.3
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.EXTENSIONS }}
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install development dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-dist"
- name: "Run Unit Tests"
if: always()
run: |
composer test