-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* proper release preparation * placeholder for test-suite * fixed some typos * composer * Create unit-tests.yml * Create release-drafter.yml * Create bundler.yml * drafter * composer * 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
09119e3
commit 8738ae0
Showing
12 changed files
with
294 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Change Log | ||
|
||
## [1.0.0](https://github.com/atk4/chart/tree/1.0.0) (2019-03-01) | ||
|
||
[Full Changelog](https://github.com/atk4/chart/compare/09fd17a39a808f84b05f75a0222814eb82c0b05e...1.0.0) | ||
|
||
**Closed issues:** | ||
|
||
- Composer didn't update to 4b593ed34af271af3dea054f2a2dc2dc69592383 [\#5](https://github.com/atk4/chart/issues/5) | ||
|
||
**Merged pull requests:** | ||
|
||
- show "no data" in label if there is no data [\#4](https://github.com/atk4/chart/pull/4) ([DarkSide666](https://github.com/DarkSide666)) | ||
- fix options [\#3](https://github.com/atk4/chart/pull/3) ([DarkSide666](https://github.com/DarkSide666)) | ||
- bugfix [\#2](https://github.com/atk4/chart/pull/2) ([DarkSide666](https://github.com/DarkSide666)) | ||
- add descriptions, add withCurrencyY [\#1](https://github.com/atk4/chart/pull/1) ([DarkSide666](https://github.com/DarkSide666)) | ||
|
||
|
||
|
||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* |
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,21 +1,39 @@ | ||
{ | ||
"name": "atk4/chart", | ||
"type": "library", | ||
"description": "ChartJS for Agile UI", | ||
"keywords": ["agile", "data", "framework", "chart", "chartjs"], | ||
"homepage": "http://agiletoolkit.org/", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Romans Malinovskis", | ||
"email": "romans@agiletoolkit.org", | ||
"homepage": "https://nearly.guru/" | ||
} | ||
], | ||
"require": { | ||
"atk4/ui": "dev-develop|*" | ||
}, | ||
"autoload": { | ||
"psr-4": {"atk4\\chart\\":"src/"} | ||
"name": "atk4/chart", | ||
"type": "library", | ||
"description": "ChartJS for Agile UI", | ||
"keywords": [ | ||
"agile", | ||
"data", | ||
"framework", | ||
"chart", | ||
"chartjs" | ||
], | ||
"homepage": "http://agiletoolkit.org/", | ||
"license": "MIT", | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"authors": [ | ||
{ | ||
"name": "Romans Malinovskis", | ||
"email": "romans@agiletoolkit.org", | ||
"homepage": "https://nearly.guru/" | ||
} | ||
], | ||
"require": { | ||
"atk4/ui": "^2.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "<6" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"atk4\\chart\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"atk4\\chart\\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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<phpunit colors="true" bootstrap="vendor/autoload.php" printerClass="atk4\core\PHPUnit_AgileResultPrinter"> | ||
<php> | ||
<env name="DSN" value="mysql://root:root@localhost/test3" /> | ||
</php> | ||
<filter> | ||
<blacklist> | ||
<directory suffix=".php">./vendor</directory> | ||
</blacklist> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<testsuites> | ||
<testsuite name="tests"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging> | ||
<log type="coverage-clover" target="build/logs/clover.xml"/> | ||
</logging> | ||
</phpunit> |
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
Empty file.
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,15 @@ | ||
<?php | ||
|
||
namespace atk4\ui\tests; | ||
|
||
class BasicTest extends \atk4\core\PHPUnit_AgileTestCase | ||
{ | ||
/** | ||
* Test constructor. | ||
*/ | ||
public function testTesting() | ||
{ | ||
$this->assertEquals('foo', 'foo'); | ||
} | ||
|
||
} |
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,86 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
product=$(basename $PWD) | ||
|
||
|
||
check=$(git symbolic-ref HEAD | cut -d / -f3) | ||
if [ $check != "develop" ]; then | ||
echo "Must be on develop branch" | ||
exit -1 | ||
fi | ||
|
||
# So that we can see un-committed stuff | ||
git status | ||
|
||
# Display list of recently released versions | ||
git fetch --tags | ||
git log --tags --simplify-by-decoration --pretty="format:%d - %cr" | head -n5 | ||
|
||
echo "Which version we are releasing: " | ||
read version | ||
|
||
function finish { | ||
git checkout develop | ||
git branch -D release/$version | ||
git checkout composer.json | ||
} | ||
trap finish EXIT | ||
|
||
# Create temporary branch (local only) | ||
git branch release/$version | ||
git checkout release/$version | ||
|
||
# Find out previous version | ||
prev_version=$(git log --tags --simplify-by-decoration --pretty="format:%d" | grep -Eo '[0-9\.A-Z-]+' | head -1) | ||
|
||
echo "Releasing $prev_version -> $version" | ||
|
||
gcg --future-release $version --unreleased false | ||
vimr CHANGELOG.md | ||
|
||
# Compute diffs | ||
#git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative $prev_version... | ||
|
||
#git log --pretty=full $prev_version... | grep '#[0-9]*' | sed 's/.*#\([0-9]*\).*/\1/' | sort | uniq | while read i; do | ||
#echo "-[ $i ]-------------------------------------------------------------------------------" | ||
#ghi --color show $i | head -50 | ||
#done | ||
|
||
#open "https://github.com/atk4/$product/compare/$prev_version...develop" | ||
|
||
# Update dependency versions | ||
sed -i "" -e '/atk4.*dev-develop/d' composer.json | ||
composer update | ||
composer require atk4/ui | ||
|
||
composer update | ||
./vendor/phpunit/phpunit/phpunit --no-coverage | ||
|
||
echo "Press enter to publish the release" | ||
read junk | ||
|
||
git commit -m "Added release notes for $version" CHANGELOG.md || echo "but its ok" | ||
merge_tag=$(git rev-parse HEAD) | ||
|
||
# use stable verisons | ||
git commit -m "Set up stable dependencies for $version" composer.json | ||
|
||
|
||
git tag $version | ||
git push origin release/$version | ||
git push --tags | ||
|
||
git checkout develop | ||
git merge $merge_tag --no-edit | ||
git push | ||
|
||
echo '=[ SUCCESS ]================================================' | ||
echo "Released atk4/$product Version $version" | ||
echo '============================================================' | ||
echo | ||
|
||
open https://github.com/atk4/$product/releases/tag/$version | ||
|
||
# do we care about master branch? nah |