Skip to content

Commit

Permalink
Merge pull request #15 from keboola/ujovlado-github-actions-and-build…
Browse files Browse the repository at this point in the history
…-fix

Switch to Github Actions, Fix build, Remove Travis
  • Loading branch information
ujovlado committed Oct 2, 2023
2 parents 4b494d3 + 58afd3c commit db74715
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 37 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Branch workflow

env:
GH_COMMIT_SHA: ${{ github.sha }}
ERROR_NOTIFICATION_EMAIL: ${{ vars.ERROR_NOTIFICATION_EMAIL }}
ORCHESTRATOR_API_TOKEN: ${{ secrets.ORCHESTRATOR_API_TOKEN }}
ORCHESTRATOR_API_URL: "https://syrup.us-east-1.keboola-testing.com/orchestrator"

on:
push:
branches:
- "*"

jobs:
build-and-test:
name: "Build and test"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Build images"
run: |
echo $GH_COMMIT_SHA > REVISION
docker network create orchestrator-router_api-tests
docker-compose build tests
- name: "Run phpunit"
run: docker-compose run --rm tests ./vendor/bin/phpunit
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions CHANGELOG.md

This file was deleted.

8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM php:5.6-cli

COPY docker/sources.list /etc/apt/sources.list

# Deps
RUN apt-get update
RUN apt-get install -y wget curl git bzip2 time libzip-dev unzip
RUN apt-get update -q \
&& apt-get install wget curl git bzip2 time libzip-dev unzip -y --no-install-recommends

# Composer
WORKDIR /root
Expand All @@ -17,4 +19,4 @@ RUN echo "memory_limit = -1" >> /usr/local/etc/php/php.ini
RUN echo "date.timezone = \"Europe/Prague\"" >> /usr/local/etc/php/php.ini
RUN composer selfupdate && composer install --no-scripts --no-autoloader

RUN composer install
RUN composer install
12 changes: 7 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Copyright (c) 2013 Keboola.com
MIT License

Copyright (c) Keboola :(){:|:&};: s.r.o.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Expand All @@ -15,5 +17,5 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Keboola Orchestrator API PHP client

[![Build Status](https://travis-ci.com/keboola/orchestrator-php-client.svg?branch=master)](https://travis-ci.com/keboola/orchestrator-php-client)
[![Branch workflow](https://github.com/keboola/orchestrator-php-client/actions/workflows/branch.yml/badge.svg?branch=master)](https://github.com/keboola/orchestrator-php-client/actions/workflows/branch.yml)

Simple PHP wrapper library for [Keboola Orchestrator REST API](http://docs.keboolaorchestratorv2api.apiary.io/)

Expand Down Expand Up @@ -42,21 +42,19 @@ Execute all orchestrations in KBC project example:
```php
use Keboola\Orchestrator\Client;

$client = Client::factory(array(
'token' => 'YOUR_TOKEN',
));
$client = Client::factory(array(
'token' => 'YOUR_TOKEN',
));

// retrieve all orchestrations in KBC project
$orchestrations = $client->getOrchestrations();
// retrieve all orchestrations in KBC project
$orchestrations = $client->getOrchestrations();

foreach ($orchestrations AS $orchestration) {
// manually execute orchestration
$client->createJob($orchestration['id']);
}
foreach ($orchestrations AS $orchestration) {
// manually execute orchestration
$client->createJob($orchestration['id']);
}
```



## Tests

To run tests you need **Storage API token** to an **empty project** in Keboola Connection. The project must be in **US region**.
Expand All @@ -80,3 +78,7 @@ docker network create orchestrator-router_api-tests
docker-compose build tests
docker-compose run --rm tests ./vendor/bin/phpunit
```

## License

MIT licensed, see [LICENSE](./LICENSE) file.
3 changes: 3 additions & 0 deletions docker/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deb http://archive.debian.org/debian stretch main
deb http://archive.debian.org/debian-security stretch/updates main
deb http://archive.debian.org/debian stretch-backports main

0 comments on commit db74715

Please sign in to comment.