-
Notifications
You must be signed in to change notification settings - Fork 16
127 lines (127 loc) · 3.99 KB
/
actions.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Build
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
tools: phive
- name: Download codesniffer
run: phive --no-progress install --trust-gpg-keys 5E6DDE998AB73B8E phpcs
- name: Install
run: composer install
- name: check
run: ./tools/phpcs
xml-lint:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
- name: Install xmllint
run: sudo apt-get install libxml2-utils
- name: lint
run: composer lintxml
test:
needs: [check, xml-lint]
runs-on: ubuntu-latest # ${{ matrix.operating-system }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
# operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
icu-versions: ['74.1', '73.2', '73.1', '71.1', '69.1', '67.1']
experimental: [false]
include:
- php-versions: '8.4'
experimental: true
name: PHP ${{ matrix.php-versions }}-icu${{ matrix.icu-versions }} # Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: sodium, intl-${{matrix.icu-version}}
ini-values: post_max_size=256M, short_open_tag=On
coverage: xdebug
- name: prepare
run: composer update
- name: test
run: composer test
# upload-xsd-file:
# needs: [xml-lint, test]
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# continue-on-error: false
# environment: github-actions
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Upload XST-File to heigl.org
# shell: bash
# env:
# FTP_USER: ${{ secrets.FTP_USER }}
# FTP_PASS: ${{ secrets.FTP_PASS }}
# run: |
# curl --ftp-create-dirs -T share/holidays.xsd -u "$FTP_USER":"$FTP_PASS" ftp://ftp.heigl.org:21/holidays.xsd
analyze:
needs: test
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
tools: phive
- name: Download psalm
run: phive --no-progress install --trust-gpg-keys 8A03EA3B385DBAA1,12CE0F1D262429A5 psalm
- name: install
run: composer update --no-dev
- name: analyze
run: ./tools/psalm
coverage:
needs: test
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
coverage: xdebug
- name: Install
run: composer update
- name: run testsuite
run: composer test-coverage
- name: upload to coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=clover.xml -v
- name: upload to codecov
uses: codecov/codecov-action@v1
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./clover.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
#verbose: true # optional (default = false)