Skip to content

Commit c97bb1e

Browse files
committed
Github action
1 parent 20ee6e1 commit c97bb1e

File tree

4 files changed

+38
-24
lines changed

4 files changed

+38
-24
lines changed

.github/workflows/code-checks.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Code checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- development
7+
8+
# This allows a subsequently queued workflow run to interrupt previous runs
9+
concurrency:
10+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
11+
cancel-in-progress: true
12+
13+
jobs:
14+
php-code-checks:
15+
runs-on: ubuntu-latest
16+
container: xolvionl/laravel:minimal
17+
steps:
18+
- name: Fix Git permissions
19+
run: git config --global --add safe.directory *
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Composer validate
23+
run: composer validate --strict
24+
- name: Composer install
25+
run: composer install
26+
- name: Larastan
27+
run: composer larastan
28+
- name: Code style
29+
run: composer format-dry
30+
- name: Run tests
31+
run: composer test

.gitlab-ci.yml

-22
This file was deleted.

docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ services:
77
command: php-fpm -F
88
hostname: laravel-data-openapi-generator
99
extra_hosts:
10-
- "laravel-data-openapi-generator.localhost:host-gateway"
10+
- "host.docker.internal:host-gateway"
1111
environment:
12-
TZ: ${TZ}
1312
COMPOSER_HOME: ~/.composer
1413
COMPOSER_CACHE_DIR: ~/.composer/cache
1514
restart: unless-stopped

tests/Feature/OpenApiGeneratorTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@
2929
expect(File::exists(config('openapi-generator.path')))->toBe(true);
3030
expect(File::get(config('openapi-generator.path')))->toBeJson();
3131
});
32+
33+
afterAll(function () {
34+
if (File::exists(config('openapi-generator.path'))) {
35+
File::delete(config('openapi-generator.path'));
36+
}
37+
});

0 commit comments

Comments
 (0)