Skip to content

Commit

Permalink
Improve docker test commands
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlatz committed Mar 2, 2020
1 parent a1720f6 commit 0d95408
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 124 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ composer test
Run tests in a docker container:

```console
composer docker
composer docker:test
```

Run tests in a docker container using a specific PHP version:

```console
PHP_VERSION=7.1 composer docker:test
```

## ISBN ranges update
Expand All @@ -68,6 +74,12 @@ composer install
composer run update-ranges
```

Or using a docker container:

```console
composer docker:update-ranges
```

## Changelog

[See Github releases](https://github.com/biblys/isbn/releases)
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"issues": "https://github.com/biblys/isbn/issues"
},
"require": {
"php": "^7.1 || ^7.2"
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "^7 || ^8",
"phpunit/phpunit": "^6 || ^7 || ^8",
"guzzlehttp/guzzle": "^6.2"
},
"autoload": {
Expand All @@ -33,7 +33,11 @@
"scripts": {
"test": "vendor/bin/phpunit tests",
"update-ranges": "php bin/update-ranges.php",
"docker:test": "docker run --rm --volume $PWD:/app --volume $COMPOSER_HOME:/tmp composer /bin/bash -c \"composer install && composer test\"",
"docker:update-ranges": "docker run --rm --volume $PWD:/app --volume $COMPOSER_HOME:/tmp composer /bin/bash -c \"composer install && composer update-ranges\""
"docker:install":
"docker run --rm -v $PWD:/app prooph/composer:${PHP_VERSION:-7.4} install",
"docker:test":
"@composer docker:install && docker run --rm -v $PWD:/app prooph/composer:${PHP_VERSION:-7.4} test",
"docker:update-ranges":
"@composer docker:install && docker run --rm -v $PWD:/app prooph/composer:${PHP_VERSION:-7.4} update-ranges"
}
}
Loading

0 comments on commit 0d95408

Please sign in to comment.