-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README.md * merge into develop * Apply fixes from StyleCI * should be master * min php 7.0 * adds support for custom error messages * update readme * fix rule merging * refactor validator again * Apply fixes from StyleCI * Update composer.json * be careful * Apply fixes from StyleCI * update * Create unit-tests.yml * Create bundler.yml * Create release-drafter.yml * draft * Setting release dependencies Co-authored-by: Romans Malinovskis <me@nearly.guru> Co-authored-by: Imants Horsts <DarkSide666@users.noreply.github.com> Co-authored-by: GitHub Web Flow <noreply@github.com>
- Loading branch information
1 parent
5d3571f
commit 7b12e57
Showing
12 changed files
with
272 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# See https://github.com/release-drafter/release-drafter#configuration | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Bundler | ||
|
||
on: create | ||
|
||
jobs: | ||
autocommit: | ||
name: Update to stable dependencies | ||
if: startsWith(github.ref, 'refs/heads/release/') | ||
runs-on: ubuntu-latest | ||
container: | ||
image: atk4/image:latest # https://github.com/atk4/image | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: echo ${{ github.ref }} | ||
- name: Update to stable dependencies | ||
run: | | ||
# replaces X keys with X-release keys | ||
jq '. as $in | reduce (keys_unsorted[] | select(endswith("-release")|not)) as $k ({}; . + {($k) : (($k + "-release") as $kr | $in | if has($kr) then .[$kr] else .[$k] end) } )' < composer.json > tmp && mv tmp composer.json | ||
v=$(echo ${{ github.ref }} | cut -d / -f 4) | ||
echo "::set-env name=version::$v" | ||
- uses: teaminkling/autocommit@master | ||
with: | ||
commit-message: Setting release dependencies | ||
- uses: ad-m/github-push-action@master | ||
with: | ||
branch: ${{ github.ref }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: pull-request | ||
uses: romaninsh/pull-request@master | ||
with: | ||
source_branch: "release/${{ env.version }}" | ||
destination_branch: "master" # If blank, default: master | ||
pr_title: "Releasing ${{ env.version }} into master" | ||
pr_body: | | ||
- [ ] Review changes (must include stable dependencies) | ||
- [ ] Merge this PR into master (will delete ${{ github.ref }}) | ||
- [ ] Go to Releases and create TAG from master | ||
Do not merge master into develop | ||
pr_reviewer: "romaninsh" | ||
pr_assignee: "romaninsh" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: toolmantim/release-drafter@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Unit Testing | ||
|
||
on: | ||
pull_request: | ||
branches: '*' | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
unit-test: | ||
name: Unit Testing | ||
runs-on: ubuntu-latest | ||
container: | ||
image: atk4/image:${{ matrix.php }} # https://github.com/atk4/image | ||
strategy: | ||
matrix: | ||
php: ['7.2', '7.3', 'latest'] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
# need this to trick composer | ||
- run: php --version | ||
- run: "git branch develop; git checkout develop" | ||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
|
||
- name: Run Tests | ||
run: | | ||
mkdir -p build/logs | ||
- name: SQLite Testing | ||
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text | ||
|
||
- uses: codecov/codecov-action@v1 | ||
if: matrix.php == 'latest' | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: build/logs/clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
language: php | ||
|
||
php: | ||
- '5.6' | ||
- '7.0' | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,52 @@ | ||
{ | ||
"name": "atk4/validate", | ||
"type": "library", | ||
"description": "Agile Data - Validator add-on", | ||
"keywords": ["framework", "orm", "query", "active record", "sql", "builder", "nosql", "mongodb", "mysql", "postgresql", "validator", "validate"], | ||
"homepage": "https://github.com/atk4/validate", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Romans Malinovskis", | ||
"email": "romans@agiletoolkit.org", | ||
"homepage": "https://nearly.guru/" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=7.0.0", | ||
"atk4/data": "dev-develop", | ||
"vlucas/valitron": "^1.4" | ||
}, | ||
"require-dev": { | ||
"atk4/schema": "dev-develop", | ||
"phpunit/phpunit": "<6", | ||
"phpunit/dbunit": ">=1.2", | ||
"phpunit/phpcov": "*", | ||
"codeclimate/php-test-reporter": "*" | ||
}, | ||
"autoload": { | ||
"psr-4": {"atk4\\validate\\":"src/"} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"atk4\\validate\\tests\\":"tests/" | ||
} | ||
"name": "atk4/validate", | ||
"type": "library", | ||
"description": "Agile Data - Validator add-on", | ||
"keywords": [ | ||
"framework", | ||
"orm", | ||
"query", | ||
"active record", | ||
"sql", | ||
"builder", | ||
"nosql", | ||
"mongodb", | ||
"mysql", | ||
"postgresql", | ||
"validator", | ||
"validate" | ||
], | ||
"homepage": "https://github.com/atk4/validate", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Romans Malinovskis", | ||
"email": "romans@agiletoolkit.org", | ||
"homepage": "https://nearly.guru/" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=7.2.0", | ||
"atk4/data": "^2.0", | ||
"vlucas/valitron": "^1.4" | ||
}, | ||
"require-dev": { | ||
"atk4/schema": "^2.0", | ||
"phpunit/phpunit": "<6", | ||
"phpunit/dbunit": ">=1.2", | ||
"phpunit/phpcov": "*", | ||
"codeclimate/php-test-reporter": "*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"atk4\\validate\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"atk4\\validate\\tests\\": "tests/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.