Skip to content

Commit

Permalink
Adjusted workflow to use test dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BreathXV committed Jun 5, 2024
1 parent ea3115c commit 0eec5f4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ jobs:
- name: Install dependencies
run: go mod tidy

- name: Build and run the application
- name: Build and test the application in Docker
run: |
docker build -t rwapi .
docker run -e "DATABASE_PATH=:memory:" -p 8080:8080 rwapi
- name: Test endpoint /check-whitelist
run: |
response=$(curl -s -X POST http://localhost:8080/check-whitelist -H "Content-Type: application/json" -d '{"ServerID": "1cdfa108-0ba6-45fc-9756-22e76304e8fa", "IdentityID": "465c3a56-743b-4755-bad0-2c60c625a779"}')
echo "$response" | jq .
echo "$response" | jq -e '.whitelisted == "true"' > /dev/null
docker build -t rwapi-test -f Dockerfile.test .
docker run rwapi-test

0 comments on commit 0eec5f4

Please sign in to comment.