Skip to content

Commit

Permalink
Ensure port 8080 is free when running make test (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler authored Sep 19, 2024
1 parent 9db317b commit 846ff6f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Check if anything is using port 8080 and kill it
run: |
if lsof -i :8080; then
echo "Port 8080 is in use by:"
lsof -i :8080
echo "Killing process using port 8080..."
kill -9 $(lsof -t -i :8080)
else
echo "Port 8080 is not in use."
fi
- run: make test

0 comments on commit 846ff6f

Please sign in to comment.