Skip to content

Commit

Permalink
Allow for a setting for functions to default to galus or Israel (#14) (
Browse files Browse the repository at this point in the history
…#18)

* Allow for a setting for functions to default to galus or Israel (#14)

* allow for setting galus as a flag:

* fix galus bug

* fix bugs and update how galus flag works

* keep some getters

* add some linting and things

* add githib workflows

* remove travis and styleci

Co-authored-by: zachweix <zachweix@users.noreply.github.com>
  • Loading branch information
tam5 and zachweix committed Jun 15, 2021
1 parent 2ce24f3 commit 371eb21
Show file tree
Hide file tree
Showing 33 changed files with 4,154 additions and 780 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/commitlint-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint commit messages
on: push

jobs:
lint:
runs-on: ubuntu-latest
name: conventional
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3
15 changes: 15 additions & 0 deletions .github/workflows/commitlint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Lint pull request title

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/pull-request-name-linter-action@v0.2.0
28 changes: 28 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Draft new release
on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v1.0.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Draft release
id: draft_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on: pull_request

jobs:
php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 8.0
coverage: none
tools: cs2pr
- name: Install dependencies
run: composer i
- name: Run linter
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --format=checkstyle | cs2pr
18 changes: 18 additions & 0 deletions .github/workflows/psalm-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Psalm security analysis

on:
push:
pull_request:

jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Psalm
uses: docker://vimeo/psalm-github-actions
with:
security_analysis: true
15 changes: 15 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Psalm

on:
push:
pull_request:

jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Psalm
uses: docker://vimeo/psalm-github-actions
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
push:
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 7.4]
stability: [prefer-stable]
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/vendor
Icon?
test-results/
.php-cs-fixer.cache
14 changes: 14 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('somedir')
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(__DIR__);

$config = new PhpCsFixer\Config();

return $config->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder);
7 changes: 0 additions & 7 deletions .styleci.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@
"nesbot/carbon": "^2.11"
},
"require-dev": {
"phpunit/phpunit": "^7.5"
"phpunit/phpunit": "^7.5",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.7",
"friendsofphp/php-cs-fixer": "^3.0"
},
"scripts": {
"psalm": "vendor/bin/psalm",
"lint": "vendor/bin/php-cs-fixer fix",
"test": "vendor/bin/phpunit",
"test-watch": "vendor/bin/phpunit-watcher watch",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
}
}
Loading

0 comments on commit 371eb21

Please sign in to comment.