forked from smalot/cups-ipp
-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (70 loc) · 2.12 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
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
name: CI
on:
workflow_dispatch:
jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
include:
#- php: 7.0
# phpunit: phpunit/phpunit ^5
# can-fail: false
#- php: 7.1
# phpunit: phpunit/phpunit ^5
# can-fail: false
#- php: 7.2
# phpunit: phpunit/phpunit ^5
# can-fail: false
#- php: 7.3
# phpunit: phpunit/phpunit ^5
# can-fail: false
#- php: 7.4
# phpunit: phpunit/phpunit ^5
# can-fail: false
#- php: 8.0
# phpunit: phpunit/phpunit ^9
# can-fail: false
#- php: 8.1
# phpunit: phpunit/phpunit ^9
# can-fail: false
- php: 8.2
phpunit: phpunit/phpunit ^9
can-fail: false
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
coverage: "none"
ini-values: "zend.assertions=1"
- name: "Update PHPUnit version"
run: composer require --dev --with-all-dependencies --no-install ${{ matrix.phpunit }}
- name: "Install dependencies"
run: |
composer self-update || true
composer update
composer --prefer-source --dev update
- name: "Remove existing CUPS"
run: sudo apt-get remove -yqq cups cups-pdf
- name: "Install new CUPS"
run: |
sudo apt-get update
sudo apt-get install -yqq cups cups-pdf cups-client
- name: "Add user"
run: |
sudo adduser --gecos "" --disabled-password print-test
sudo chpasswd <<<"print-test:print-test"
sudo usermod -a -G lpadmin print-test
- name: "Restart and test CUPS"
run: |
sudo service cups restart
lp -d PDF LICENSE && sleep 10
- name: "Run PHPUnit"
run: "vendor/bin/phpunit"