-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 915 Bytes
/
build.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
name: 'Install dependencies and test'
on:
push:
paths:
- "src/**"
- ".github/workflows/**"
branches:
- main
pull_request:
paths:
- "src/**"
- ".github/workflows/**"
types:
- opened
- synchronize
- reopened
- draft
- ready_for_review
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v3
- name: 'Cache composer results'
id: cache-composer
uses: actions/cache@v3
with:
path: ./composer.lock
key: ${{ github.sha }}-composer
- name: 'Composer install'
if: steps.cache-composer.outputs.cache-hit != 'true'
run: docker run --rm -v $(pwd):/app composer install
- name: 'PHPUnit tests'
run: docker run --rm -v $(pwd):/app -w /app php:8.2-cli vendor/bin/phpunit