Skip to content

Commit

Permalink
add action for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jljl1337 committed Dec 20, 2024
1 parent 79d7984 commit b64c330
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Testing

on:
pull_request:
branches:
- main
types:
- opened

jobs:
test:
name: Test the Docker image
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build the Docker image
run: docker build -t jljl1337/testpod:test .

- name: Run and test the Docker image
run: |
docker run -d -p 3000:8000 jljl1337/testpod:test
curl http://localhost:3000/
curl http://localhost:3000/api
docker stop $(docker ps -q)

0 comments on commit b64c330

Please sign in to comment.