Skip to content

Commit

Permalink
Merge pull request #78 from jjgrainger/maintenance
Browse files Browse the repository at this point in the history
Maintenace
  • Loading branch information
jjgrainger authored May 11, 2022
2 parents a875846 + dbca69f commit 418655e
Show file tree
Hide file tree
Showing 8 changed files with 1,924 additions and 24 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/vendor
composer.phar
composer.lock
.DS_Store
.phpunit.result.cache
coverage.xml
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PostTypes v2.1

[![Build Status](https://flat.badgen.net/travis/jjgrainger/PostTypes?label=build)](https://travis-ci.org/jjgrainger/PostTypes) [![Latest Stable Version](https://flat.badgen.net/github/release/jjgrainger/PostTypes/stable)](https://packagist.org/packages/jjgrainger/posttypes) [![Total Downloads](https://flat.badgen.net/packagist/dt/jjgrainger/PostTypes)](https://packagist.org/packages/jjgrainger/posttypes) [![License](https://flat.badgen.net/github/license/jjgrainger/PostTypes)](https://packagist.org/packages/jjgrainger/posttypes)
[![tests](https://github.com/jjgrainger/PostTypes/actions/workflows/tests.yml/badge.svg)](https://github.com/jjgrainger/PostTypes/actions/workflows/tests.yml) [![codecov](https://codecov.io/gh/jjgrainger/PostTypes/branch/master/graph/badge.svg?token=SGrK2xDF46)](https://codecov.io/gh/jjgrainger/PostTypes) [![Latest Stable Version](https://flat.badgen.net/github/release/jjgrainger/PostTypes/stable)](https://packagist.org/packages/jjgrainger/posttypes) [![Total Downloads](https://flat.badgen.net/packagist/dt/jjgrainger/PostTypes)](https://packagist.org/packages/jjgrainger/posttypes) [![License](https://flat.badgen.net/github/license/jjgrainger/PostTypes)](https://packagist.org/packages/jjgrainger/posttypes)

> Simple WordPress custom post types.
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
20 changes: 13 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"name": "jjgrainger/posttypes",
"version": "2.1",
"description": "Simple WordPress custom post types.",
"homepage": "https://github.com/jjgrainger/posttype",
"keywords": ["wordpress", "post-types"],
"license": "MIT",
"homepage": "https://posttypes.jjgrainger.co.uk",
"support": {
"issues": "https://github.com/jjgrainger/posttypes/issues",
"source": "https://github.com/jjgrainger/posttypes"
},
"authors": [
{
"name": "Joe Grainger",
"email": "[email protected]",
"homepage": "https://jjgrainger.co.uk"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=7.2"
},
Expand All @@ -20,12 +22,16 @@
"squizlabs/php_codesniffer": "3.*"
},
"autoload": {
"psr-4": { "PostTypes\\": "src/" }
"psr-4": {
"PostTypes\\": "src/"
}
},
"scripts": {
"test": [
"./vendor/bin/phpcs --standard=psr2 src",
"./vendor/bin/phpunit"
"./vendor/bin/phpunit --coverage-clover=coverage.xml"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading

0 comments on commit 418655e

Please sign in to comment.