This application integrates Musement's API with WeatherApi
- Author: Stefan Touhami
- Git
- Docker and Docker Compose
- WeatherApi Key
To install application you have to execute few commands
git clone git@github.com:ElGovanni/weather-api.git
cd weather-apiInstall composer dependencies
docker-compose run --rm composer installFor proper operation of the application, you need to add an environment variable with your WeatherApi key using command below but with your key instead of <YOUR_API_KEY>.
echo "WEATHER_API_KEY=<YOUR_API_KEY>" > .env.localOr if you want to avoid bash just create new file .env.local with WEATHER_API_KEY=<YOUR_API_KEY> in root project directory.
To display forecast for cities from Musement's API execute below command inside php container
docker-compose run --rm php bin/console app:forecastYou can change default 2 days of forecast to other in range 1:3 by using argument days, for example:
docker-compose run --rm php bin/console app:forecast 3You should enter into docker php container using command below before you are going to execute rest of test commands below.
Master branch tests coverage report is available on project github page
docker-compose run --rm php bin/phpunitExecute this to run tests and generate coverage report.
docker-compose run --rm php bin/phpunit --coverage-html var/coverage-reportBelow command check coding standards in src and tests directory.
docker-compose run --rm php ./vendor/bin/ecs checkStatic analysis using PHPStan tool to find errors before run app.
docker-compose run --rm php ./vendor/bin/phpstan analyse