Skip to content

Commit e1c3812

Browse files
authored
Prepare for release (#6)
* Update composer description * Add GitHub Action workflow for staging branch * Clean up workflow files * Update badges to check agains release branch in README.md * Test run staging branch on multiple PHP versions * GitHub Actions workflow for release on multiple OSes * Add mbstring extension for test on Windows * Add packagist badge to README.md
1 parent 1cb8669 commit e1c3812

File tree

5 files changed

+48
-12
lines changed

5 files changed

+48
-12
lines changed

.github/workflows/Develop Branch.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ jobs:
2020
run: php ./vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.xml
2121

2222
- name: Upload coverage to Codecov
23-
uses: codecov/codecov-action@v1
24-
with:
25-
file: ./coverage.xml
23+
uses: codecov/codecov-action@v1

.github/workflows/Release Branch.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,25 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
12-
11+
runs-on: ${{ matrix.operating-system }}
12+
strategy:
13+
matrix:
14+
operating-system: [ubuntu-latest, windows-latest]
15+
php-versions: ['7.2', '7.3', '7.4']
1316
steps:
1417
- uses: actions/checkout@v2
1518

19+
- name: Install PHP version
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
extensions: mbstring
24+
1625
- name: Install dependencies
1726
run: composer install --prefer-dist --no-progress --no-suggest
1827

1928
- name: Test with PHPUnit, generate code coverage
2029
run: php ./vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.xml
2130

2231
- name: Upload coverage to Codecov
23-
uses: codecov/codecov-action@v1
24-
with:
25-
file: ./coverage.xml
32+
uses: codecov/codecov-action@v1
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: staging
2+
3+
on:
4+
push:
5+
branches: [ staging ]
6+
pull_request:
7+
branches: [ staging ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.operating-system }}
12+
strategy:
13+
matrix:
14+
operating-system: [ubuntu-latest]
15+
php-versions: ['7.2', '7.3', '7.4']
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Install PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
24+
- name: Install dependencies
25+
run: composer install --prefer-dist --no-progress --no-suggest
26+
27+
- name: Test with PHPUnit, generate code coverage
28+
run: php ./vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.xml
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# National Identification Numbers
44
[![php version](https://img.shields.io/badge/php-%3E%3D7.2-8892BF.svg?logo=php)](https://github.com/vladdeSV/php-nin/blob/develop/composer.json)
5-
[![codecov](https://codecov.io/gh/vladdeSV/php-nin/branch/develop/graph/badge.svg)](https://codecov.io/gh/vladdeSV/php-nin)
6-
[![styleci](https://github.styleci.io/repos/247304996/shield?style=flat&branch=develop)](https://github.styleci.io/repos/247304996)
7-
[![develop](https://github.com/vladdeSV/php-nin/workflows/develop/badge.svg?branch=develop)](https://github.com/vladdeSV/php-nin/actions?query=workflow%3Adevelop)
5+
[![latest release](https://img.shields.io/packagist/v/vladdeSV/php-nin.svg?style=flat)](https://packagist.org/packages/vladdeSV/php-nin)
6+
[![codecov](https://codecov.io/gh/vladdeSV/php-nin/branch/release/graph/badge.svg)](https://codecov.io/gh/vladdeSV/php-nin)
7+
[![styleci](https://github.styleci.io/repos/247304996/shield?style=flat&branch=release)](https://github.styleci.io/repos/247304996)
88

99
This library validates the structure of individual identification numbers. Currently supporting all Nordic countries.
1010

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vladdesv/php-nin",
3-
"description": "National Identification Number",
3+
"description": "Verify structure of individual national identification numbers",
44
"type": "library",
55
"license": "MIT",
66
"authors": [

0 commit comments

Comments
 (0)