Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenace #78

Merged
merged 10 commits into from May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
@@ -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
@@ -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
@@ -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
@@ -0,0 +1 @@
comment: false
20 changes: 13 additions & 7 deletions composer.json
@@ -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": "hello@jjgrainger.co.uk",
"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
}