-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.35 KB
/
ci.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
name: ci
on: [push, pull_request]
jobs:
automated-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: ["8.1", "8.3"]
composer_command: ["composer install"]
env:
PHP_VERSION: ${{ matrix.php_version }}
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start services with Docker Compose
run: docker-compose up -d
- name: Build dependencies
run: docker-compose exec -T php ${{ matrix.composer_command }}
- name: Run tests
run: docker-compose exec -T php ./vendor/bin/phpunit
code-sniffer:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: ["8.1", "8.3"]
env:
PHP_VERSION: ${{ matrix.php_version }}
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start services with Docker Compose
run: docker-compose up -d
- name: Install dependencies
run: docker-compose exec -T php composer install
- name: Run code sniffer
run: docker-compose exec -T php ./vendor/bin/grumphp run