Skip to content

Commit

Permalink
change to circle.ci testing (#57)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
danielme85 authored Feb 22, 2023
1 parent dd45dc7 commit e07c2ab
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# PHP CircleCI 2.0 configuration file
# See: https://circleci.com/docs/2.0/language-php/
version: 2

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
build:
working_directory: /app
docker:
- image: ghcr.io/danielme85/lltdb-testbench
- image: mariadb:latest
environment:
MYSQL_DATABASE: 'logtodb'
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
- image: mongo:latest
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Run tests
command: |
cp .env.testing .env
composer install --no-interaction
composer dump-autoload
dockerize -wait tcp://localhost:3306 -timeout 1m &&
php -dpcov.enabled=1 -dpcov.directory="./src" -dpcov.exclude="~vendor~" ./vendor/bin/phpunit --coverage-clover coverage.xml
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t $CODECOV_TOKEN
4 changes: 2 additions & 2 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DB_CONNECTION=mysql
DB_HOST=mariadb
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=logtodb
DB_USERNAME=root
DB_PASSWORD=root
MDB_DATABASE=logtodb
MDB_HOST=mongo
MDB_HOST=127.0.0.1
MDB_PORT=27017
2 changes: 1 addition & 1 deletion buildDockerImages.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
echo "Building PHP8 image..." &&
cd ./docker/php8 && docker build . -t ghcr.io/danielme85/lltdb-testbench:latest
cd ./docker/php8 && docker buildx build --platform linux/amd64,linux/arm64 --push . -t ghcr.io/danielme85/lltdb-testbench:latest
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: "2.4"
version: "3.0"
services:

mariadb:
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![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)
[![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)
[![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)
[![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)
[![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)

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

0 comments on commit e07c2ab

Please sign in to comment.