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 [email protected]:ElGovanni/weather-api.git
cd weather-api
Install composer dependencies
docker-compose run --rm composer install
For 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.local
Or 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:forecast
You 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 3
You 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/phpunit
Execute this to run tests and generate coverage report.
docker-compose run --rm php bin/phpunit --coverage-html var/coverage-report
Below command check coding standards in src and tests directory.
docker-compose run --rm php ./vendor/bin/ecs check
Static analysis using PHPStan tool to find errors before run app.
docker-compose run --rm php ./vendor/bin/phpstan analyse