Skip to content

Commit 5a57bcd

Browse files
authored
ci: #137 phpunit codecov
1 parent 3fb50d0 commit 5a57bcd

File tree

3 files changed

+41
-63
lines changed

3 files changed

+41
-63
lines changed

.circleci/config.yml

-57
This file was deleted.

.github/workflows/laravel-11.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: laravel-11
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
test:
12+
name: Test
13+
runs-on: ubuntu-latest
14+
container:
15+
image: laravelfans/laravel:11-dev
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: GitHub Environment Variables Action
21+
uses: FranzDiebold/[email protected]
22+
23+
- name: Prepare
24+
run: |
25+
composer install
26+
npm install
27+
npm run build
28+
29+
- name: PHPUnit
30+
run: |
31+
php artisan test --log-junit junit.xml
32+
33+
- name: Upload test results to Codecov
34+
if: ${{ !cancelled() }}
35+
uses: codecov/test-results-action@v1
36+
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}

composer.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@
4141
"post-update-cmd": [
4242
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
4343
],
44-
"post-root-package-install": [
45-
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
46-
],
47-
"post-create-project-cmd": [
48-
"@php artisan key:generate --ansi",
49-
"@php artisan migrate --graceful --ansi"
44+
"post-install-cmd": [
45+
"[ $COMPOSER_DEV_MODE -eq 0 ] || php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
46+
"[ $COMPOSER_DEV_MODE -eq 0 ] || php artisan key:generate --ansi",
47+
"[ $COMPOSER_DEV_MODE -eq 0 ] || php artisan migrate --graceful --ansi"
5048
],
5149
"dev": [
5250
"Composer\\Config::disableProcessTimeout",

0 commit comments

Comments
 (0)