-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from keboola/adamvyborny-handle-null-column
Handle null column & migrate to GH actions
- Loading branch information
Showing
27 changed files
with
786 additions
and
142 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
name: 'GitHub Actions' | ||
'on': | ||
- push | ||
concurrency: 'ci-${{ github.ref }}' | ||
env: | ||
APP_IMAGE: keboola-php-csv | ||
DOCKERHUB_USER: '${{ secrets.DOCKERHUB_USER }}' | ||
DOCKERHUB_TOKEN: '${{ secrets.DOCKERHUB_TOKEN }}' | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: 'Check out the repo' | ||
uses: actions/checkout@v2 | ||
- | ||
name: 'Docker login' | ||
if: env.DOCKERHUB_TOKEN | ||
run: 'docker login --username "$DOCKERHUB_USER" --password "$DOCKERHUB_TOKEN"' | ||
- | ||
name: 'Build image' | ||
run: 'docker build -t $APP_IMAGE .' | ||
- | ||
name: 'Run tests' | ||
run: 'docker run ${{env.APP_IMAGE}} composer ci' |
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ composer.phar | |
vendor | ||
*.kdev4 | ||
.kdev4 | ||
.phpunit.result.cache |
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
FROM php:7.4 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction" | ||
|
||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
ENV COMPOSER_PROCESS_TIMEOUT 3600 | ||
|
||
WORKDIR /code/ | ||
|
||
COPY composer-install.sh /tmp/composer-install.sh | ||
|
||
RUN apt-get update -q \ | ||
&& apt-get install unzip git wget -y --no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& /tmp/composer-install.sh \ | ||
&& rm /tmp/composer-install.sh \ | ||
&& mv composer.phar /usr/local/bin/composer | ||
|
||
## Composer - deps always cached unless changed | ||
# First copy only composer files | ||
COPY composer.* /code/ | ||
# Download dependencies, but don't run scripts or init autoloaders as the app is missing | ||
RUN composer install $COMPOSER_FLAGS --no-scripts --no-autoloader | ||
# copy rest of the app | ||
COPY . /code/ | ||
# run normal composer - all deps are cached already | ||
RUN composer install $COMPOSER_FLAGS | ||
|
||
CMD bash |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_SIGNATURE="$(php -r "echo hash_file('SHA384', 'composer-setup.php');")" | ||
|
||
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer signature' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
|
||
php composer-setup.php --quiet | ||
RESULT=$? | ||
rm composer-setup.php | ||
exit $RESULT |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
dev: | ||
build: . | ||
tty: true | ||
volumes: | ||
- ./:/code | ||
working_dir: /code |
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,24 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Project"> | ||
<rule ref="vendor/keboola/coding-standard/src/ruleset.xml"/> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"> | ||
<exclude name="SlevomatCodingStandard.Classes.ClassConstantVisibility.MissingConstantVisibility"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing"/> | ||
</rule> | ||
</ruleset> |
Oops, something went wrong.