Skip to content

Commit e07c2ab

Browse files
authored
change to circle.ci testing (#57)
* buddy.works free plan is useless, lets try circle.ci again: we have gone full circle... * switch to circle.ci badge * Merge remote-tracking branch 'origin/v4' into v4
1 parent dd45dc7 commit e07c2ab

File tree

5 files changed

+37
-5
lines changed

5 files changed

+37
-5
lines changed

.circleci/config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# PHP CircleCI 2.0 configuration file
2+
# See: https://circleci.com/docs/2.0/language-php/
3+
version: 2
4+
5+
# Define a job to be invoked later in a workflow.
6+
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
7+
jobs:
8+
build:
9+
working_directory: /app
10+
docker:
11+
- image: ghcr.io/danielme85/lltdb-testbench
12+
- image: mariadb:latest
13+
environment:
14+
MYSQL_DATABASE: 'logtodb'
15+
MYSQL_ROOT_PASSWORD: 'root'
16+
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
17+
- image: mongo:latest
18+
steps:
19+
- checkout
20+
- setup_remote_docker:
21+
docker_layer_caching: true
22+
- run:
23+
name: Run tests
24+
command: |
25+
cp .env.testing .env
26+
composer install --no-interaction
27+
composer dump-autoload
28+
dockerize -wait tcp://localhost:3306 -timeout 1m &&
29+
php -dpcov.enabled=1 -dpcov.directory="./src" -dpcov.exclude="~vendor~" ./vendor/bin/phpunit --coverage-clover coverage.xml
30+
curl -Os https://uploader.codecov.io/latest/linux/codecov
31+
chmod +x codecov
32+
./codecov -t $CODECOV_TOKEN

.env.testing

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
DB_CONNECTION=mysql
2-
DB_HOST=mariadb
2+
DB_HOST=127.0.0.1
33
DB_PORT=3306
44
DB_DATABASE=logtodb
55
DB_USERNAME=root
66
DB_PASSWORD=root
77
MDB_DATABASE=logtodb
8-
MDB_HOST=mongo
8+
MDB_HOST=127.0.0.1
99
MDB_PORT=27017

buildDockerImages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
echo "Building PHP8 image..." &&
3-
cd ./docker/php8 && docker build . -t ghcr.io/danielme85/lltdb-testbench:latest
3+
cd ./docker/php8 && docker buildx build --platform linux/amd64,linux/arm64 --push . -t ghcr.io/danielme85/lltdb-testbench:latest

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
version: "2.4"
2+
version: "3.0"
33
services:
44

55
mariadb:

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![GitHub tag](https://img.shields.io/github/tag/danielme85/laravel-log-to-db.svg?style=flat-square)](https://github.com/danielme85/laravel-log-to-db)
66
[![Codecov](https://img.shields.io/codecov/c/github/danielme85/laravel-log-to-db.svg?style=flat-square)](https://codecov.io/gh/danielme85/laravel-log-to-db)
77
[![CodeFactor](https://img.shields.io/codefactor/grade/github/danielme85/laravel-log-to-db?style=flat-square)](https://www.codefactor.io/repository/github/danielme85/laravel-log-to-db)
8-
[![buddy pipeline](https://app.buddy.works/mellum/laravel-log-to-db/pipelines/pipeline/428957/badge.svg?token=4dc1f653bedb370e80876dcda7d7c623a8cb67e2270e6255d9ceedba498cd884 "buddy pipeline")](https://app.buddy.works/mellum/laravel-log-to-db/pipelines/pipeline/428957)
8+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/danielme85/laravel-log-to-db/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/danielme85/laravel-log-to-db/tree/main)
99

1010
Hi, this is a custom Laravel 5.6+ Log channel handler that can store log events to SQL or MongoDB databases.
1111
Uses Laravel native logging functionality trough [Monolog](https://github.com/Seldaek/monolog).

0 commit comments

Comments
 (0)