Skip to content

Commit e1166bb

Browse files
Merge branch 'master' of github.com:tsekka/laravel-block-bots into tsekka-master
# Conflicts: # .github/workflows/test.yml
2 parents dca12f4 + 97abb2f commit e1166bb

File tree

4 files changed

+1053
-1594
lines changed

4 files changed

+1053
-1594
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,42 @@
11
name: Tests
2+
23
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
39
jobs:
410
phpunit-tests:
511
runs-on: ubuntu-latest
12+
services:
13+
redis:
14+
image: redis:5.0.5-alpine
15+
ports:
16+
- 6379:6379
17+
options: >-
18+
--health-cmd "redis-cli ping"
19+
--health-interval 10s
20+
--health-timeout 5s
21+
--health-retries 5
22+
strategy:
23+
matrix:
24+
php: ['8.2', '8.3', '8.4']
25+
fail-fast: false
626
steps:
727
- uses: actions/checkout@v3
8-
9-
# Install Docker Compose before using it
10-
- name: Install Docker Compose
11-
run: |
12-
sudo apt-get update
13-
sudo apt-get install -y docker-compose-plugin
14-
docker compose version
15-
28+
29+
- name: Update PHP version in Dockerfile
30+
run: sed -i "s/FROM php:8.2-cli/FROM php:${{ matrix.php }}-cli/" Dockerfile
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
1635
- name: Build container
1736
run: docker compose build
18-
37+
1938
- name: Install dependencies
2039
run: docker compose run --rm laravel_block_bots composer install
21-
40+
2241
- name: Run tests
2342
run: docker compose run --rm laravel_block_bots composer run test

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ VOLUME /var/www/html
1414

1515
COPY --from=composer /usr/bin/composer /usr/bin/composer
1616

17-
CMD ["composer", "install"]
17+
CMD composer install && tail -f /dev/null

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"test": "XDEBUG_MODE=coverage phpunit --coverage-text"
1212
},
1313
"require": {
14-
"php" : "^7.1 || ^8.0 || ^8.1 || ^8.2",
15-
"laravel/framework": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0",
14+
"php" : "^7.1 || ^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4",
15+
"laravel/framework": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
1616
"predis/predis": "^2.2",
1717
"guzzlehttp/guzzle": "^7.5.0",
1818
"ext-json": "*"

0 commit comments

Comments
 (0)