CI #187
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
--- | |
name: CI | |
'on': | |
pull_request: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "4 20 * * 0" | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
- name: Run Docker container. | |
run: > | |
docker run -d -p 9924:80 --name shelly-plug \ | |
-e SHELLY_HOSTNAME='my-shelly-plug-host-or-ip' \ | |
-e SHELLY_HTTP_USERNAME='username' \ | |
-e SHELLY_HTTP_PASSWORD='password' \ | |
-v "$PWD":/var/www/html \ | |
php:8-apache | |
- name: Inspect Docker container. | |
run: > | |
sleep 3 && docker ps | |
- name: Test that we're getting the expected result. | |
run: curl http://localhost:9924/metrics | grep "Could not resolve host" |