forked from larastan/larastan
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.33 KB
/
tests.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
name: "tests"
on:
push:
# Prevent duplicating jobs on PR-s from local branches
branches:
- "master"
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
tests:
strategy:
fail-fast: true
matrix:
php: ["8.0", "8.1"]
laravel: ["^9.0"]
name: "P${{ matrix.php }} - L${{ matrix.laravel }}"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: "dom, curl, libxml, mbstring, zip"
tools: "composer:v2"
coverage: "none"
- name: "Check Composer configuration"
run: "composer validate --strict"
- name: "Check file permissions"
run: "test \"$(find . -type f -not -path './.git/*' -executable)\" == ./tests/laravel-test.sh"
- name: "Install dependencies"
run: "composer update --with='illuminate/contracts:${{ matrix.laravel }}' --prefer-dist --no-interaction --no-progress"
- name: "Execute static analysis"
run: "composer run-script test:types"
- name: "Execute unit tests"
run: "composer run-script test:unit"
- name: "Run Larastan on Laravel sample applications"
run: "tests/laravel-test.sh"