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

add base structure #2

Merged
merged 1 commit into from Oct 2, 2020
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/main.yml
@@ -0,0 +1,43 @@
# Name of workflow
name: PHP CI

# Trigger the workflow on push or pull request
on:
- push
- pull_request

jobs:
build:

# The type of machine to run the job on
runs-on: ubuntu-latest

steps:
# Check-out repository under GitHub workspace
# https://github.com/actions/checkout
- uses: actions/checkout@v2
# Step's name
- name: Setup PHP
# Action gives to setup the PHP environment to test application
# https://github.com/shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
# Specify the PHP version
php-version: '7.4'
- name: Install
# Install project
run: make install
- name: Run linter
# Run Linter
run: make lint
# Publish code coverage on Code Climate
# https://github.com/paambaati/codeclimate-action
- name: Run test & publish code coverage
uses: paambaati/codeclimate-action@v2.6.0
# Add Code Climate secret key
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: make test-coverage
coverageLocations: ${{github.workplace}}/build/logs/clover.xml:clover
debug: true
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
/vendor/
composer.lock
12 changes: 12 additions & 0 deletions Makefile
@@ -0,0 +1,12 @@
test:
composer exec phpunit -- -v tests

lint:
composer exec phpcs -- --standard=PSR12 -v src tests
composer exec --verbose phpstan -- --level=8 analyse src tests

lint-fix:
composer exec phpcbf -- --standard=PSR12 -v src tests

test-coverage:
composer exec --verbose phpunit tests -- --coverage-clover build/logs/clover.xml
4 changes: 3 additions & 1 deletion README.md
@@ -1 +1,3 @@
# phpstan-functional-programming
# phpstan-functional-programming

PHPStan for functional programming
20 changes: 20 additions & 0 deletions composer.json
@@ -0,0 +1,20 @@
{
"name": "hexlet/phpstan-fp",
"description": "PHPStan rules for functional programming",
"type": "library",
"require": {
"php": "^7.1",
"phpstan/phpstan": "^0.12.48"
},
"license": "MIT",
"require-dev": {
"phpunit/phpunit": "^9.4",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
"psr-4": {
"Hexlet\\PHPStanFp\\": "src/",
"Hexlet\\PHPStanFp\\Tests\\": "tests/"
}
}
}
Empty file added src/.gitkeep
Empty file.
Empty file added tests/.gitkeep
Empty file.