Update dockerfile to handle github actions #2
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: Test | |
on: | |
pull_request: | |
push: { branches: main } | |
jobs: | |
test: | |
name: Run test suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build docker image | |
run: docker build -t dancer . | |
- name: Run docker image with entrypoint | |
run: docker run -d -p 3001:3000 --name dancer_container dancer | |
- name: Validate endpoint works | |
run: curl -i http://127.0.0.1:3001/ |