Skip to content

Commit 2ae52c6

Browse files
committed
Add github workflow
1 parent 50a726f commit 2ae52c6

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

.github/workflows/phpunit.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: PHPUnit
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- "*.*.*"
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: "0 8 * * 1"
13+
14+
jobs:
15+
Build:
16+
runs-on: 'ubuntu-latest'
17+
container: 'byjg/php:${{ matrix.php-version }}-cli'
18+
strategy:
19+
matrix:
20+
php-version:
21+
- "8.1"
22+
- "8.0"
23+
- "7.4"
24+
- "7.3"
25+
- "7.2"
26+
- "7.1"
27+
- "7.0"
28+
- "5.6"
29+
30+
steps:
31+
- uses: actions/checkout@v2
32+
- run: composer install
33+
- run: ./vendor/bin/phpunit
34+
35+
Documentation:
36+
runs-on: 'ubuntu-latest'
37+
needs: Build
38+
if: github.ref == 'refs/heads/master'
39+
env:
40+
DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
41+
steps:
42+
- uses: actions/checkout@v2
43+
- run: curl https://opensource.byjg.com/add-doc.sh | bash /dev/stdin php singleton

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
# Singleton Pattern
22

3-
[![Build Status](https://travis-ci.org/byjg/SingletonPatternPHP.svg?branch=master)](https://travis-ci.org/byjg/SingletonPatternPHP)
4-
[![Maintainable Rate](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
5-
[![Reliability Rate](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
6-
[![Security Rate](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=security_rating)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
7-
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=alert_status)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
8-
[![Code Coverage](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=coverage)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
9-
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=bugs)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
10-
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=code_smells)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
11-
[![Techinical Debt](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=sqale_index)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
12-
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=SingletonPatternPHP&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=SingletonPatternPHP)
13-
3+
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
144
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/byjg/SingletonPatternPHP/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/byjg/SingletonPatternPHP/?branch=master)
15-
[![Code Climate](https://codeclimate.com/github/byjg/SingletonPatternPHP/badges/gpa.svg)](https://codeclimate.com/github/byjg/SingletonPatternPHP)
5+
[![Build Status](https://github.com/byjg/SingletonPatternPHP/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/SingletonPatternPHP/actions/workflows/phpunit.yml)
166

177

188
A lightweight PHP implementation of the Design Pattern Singleton using trait.
@@ -55,3 +45,5 @@ composer require "byjg/singleton-pattern=~1.0"
5545
* https://en.wikipedia.org/wiki/Singleton_pattern
5646

5747

48+
----
49+
[Open source ByJG](http://opensource.byjg.com)

0 commit comments

Comments
 (0)