Skip to content

Commit

Permalink
Make use of Github actions (instead of travis) (#115)
Browse files Browse the repository at this point in the history
* add unit-tests

* dependencies

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
  • Loading branch information
romaninsh committed Dec 1, 2019
1 parent 6fb6505 commit 2c2655f
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
template: |
## What’s Changed
$CHANGES
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
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@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Unit Testing

on:
pull_request

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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ docs/build
/vendor
/composer.lock
.DS_Store
.github*
#.github*
/.idea
.phpunit.result.cache
File renamed without changes.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"homepage": "https://github.com/atk4/core",
"license": "MIT",
"minimum-stability": "dev",
"prefer-stable": true,
"authors": [
{
"name": "Romans Malinovskis",
Expand Down

0 comments on commit 2c2655f

Please sign in to comment.