File tree Expand file tree Collapse file tree 4 files changed +1053
-1594
lines changed Expand file tree Collapse file tree 4 files changed +1053
-1594
lines changed Original file line number Diff line number Diff line change 11name : Tests
2+
23on : [push, pull_request]
4+
5+ concurrency :
6+ group : ${{ github.workflow }}-${{ github.ref }}
7+ cancel-in-progress : true
8+
39jobs :
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
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ VOLUME /var/www/html
1414
1515COPY --from=composer /usr/bin/composer /usr/bin/composer
1616
17- CMD [ " composer" , " install" ]
17+ CMD composer install && tail -f /dev/null
Original file line number Diff line number Diff line change 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" : " *"
You can’t perform that action at this time.
0 commit comments