-
Notifications
You must be signed in to change notification settings - Fork 177
49 lines (45 loc) · 1.15 KB
/
build-test.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
name: Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
container: composer:latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build code
run: composer install
- name: Zip build
run: zip -r vendor.zip vendor
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: moosh-vendor
path: vendor.zip
test:
strategy:
fail-fast: false
matrix:
image: ["8.2", "8.1", "8.0", "7.4", "7.3", "7.2"]
runs-on: ubuntu-latest
container: php:${{ matrix.image }}-cli-alpine
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Remove vendor folder
run: rm -rf vendor
- name: Download build
uses: actions/download-artifact@v4
with:
name: moosh-vendor
- name: Unzip build
run: unzip vendor.zip
- name: Run test
run: php moosh.php | grep "moosh version"
- name: Lint files
run: find . *.php | xargs -i php -l