-
Notifications
You must be signed in to change notification settings - Fork 160
106 lines (84 loc) · 2.96 KB
/
CI.yaml
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
101
102
103
104
105
106
name: CI
on:
push:
pull_request:
jobs:
run:
strategy:
fail-fast: false
matrix:
include:
# Includes php7.4-8.x, composer 2, php-xdebug, and more
# https://github.com/actions/virtual-environments/blob/ubuntu20/20210318.0/images/linux/Ubuntu2004-README.md#php
- os: ubuntu-20.04
php: "7.4"
- os: ubuntu-20.04
php: "8.0"
- os: ubuntu-20.04
php: "8.1"
- os: ubuntu-20.04
php: "8.2"
name: Test PHP ${{ matrix.php }}
runs-on: ${{ matrix.os }}
env:
COMPOSER_DISABLE_XDEBUG_WARN: 1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use PHP ${{ matrix.php }}
run: |
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
sudo apt-add-repository ppa:ondrej/php -y
sudo apt-fast install -y --no-install-recommends php${{ matrix.php }}-ast
- name: Use Composer v1
run: composer require --dev --no-update composer/composer:^1.1
- name: Print Composer version
run: composer --version
- name: composer install
run: composer update --no-interaction --no-progress --ansi
- run: composer test
- name: Use Composer v2
run: composer require --dev --no-update composer/composer:^2.0
- name: Print Composer version
run: composer --version
- name: composer install
run: composer update --no-interaction --no-progress --ansi
- run: composer test
- name: composer phan
# Phan fails on PHP 8.2 due to warnings; waiting on upstream releases to fix
if: ${{ matrix.php < 8.2 }}
run: composer phan
ocular-push:
runs-on: ubuntu-20.04
if: ${{ success() }} && github.repository == 'wikimedia/composer-merge-plugin'
needs: [run]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use PHP 7.4
run: sudo update-alternatives --set php /usr/bin/php7.4
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run coverage
run: composer coverage
env:
XDEBUG_MODE: coverage
- name: Get Ocular
run: wget https://scrutinizer-ci.com/ocular.phar
continue-on-error: true
- name: Upload code coverage
run: php ocular.phar code-coverage:upload --format=php-clover reports/coverage.xml
continue-on-error: true
# irc-push:
# runs-on: ubuntu-latest
# timeout-minutes: 15
# if: ${{ always() }} && github.repository == 'wikimedia/composer-merge-plugin'
# needs: [run]
# steps:
# - name: IRC push notification
# uses: rectalogic/notify-irc@v1
# if: github.event_name == 'push'
# with:
# channel: "#wikimedia-dev"
# nickname: wikimedia-github
# message: "${{ github.repository }}#${{ github.run_id }} (${{ github.ref }} - ${{ github.sha }} ${{ github.actor }}): ${{ job.status }} - https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"