-
Notifications
You must be signed in to change notification settings - Fork 20
58 lines (53 loc) · 1.54 KB
/
github-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
name: HorizontCMS CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
args: --ignore-platform-reqs
- name: Check PHP syntax errors
uses: overtrue/[email protected]
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
args: --ignore-platform-reqs
- name: Force installed variable
run: export INSTALLED=YES
- name: Run unit tests
run: XDEBUG_MODE=coverage vendor/bin/phpunit --testsuite Unit,Integration --coverage-clover reports/coverage.xml
# - name: Upload coverage
# run: |
# if [ -f "reports/coverage.xml" ]; then vendor/bin/codacycoverage clover reports/coverage.xml; fi
- name: Show versions
run: |
php artisan --version
php artisan hcms:version
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3']
docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ttimot24/horizont-cms:latest