Skip to content

Commit

Permalink
feat(tests): when running in ci call "go mod download" first, pt4
Browse files Browse the repository at this point in the history
  • Loading branch information
jochumdev committed Feb 23, 2025
1 parent 482f192 commit 6864739
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,29 @@ jobs:
verb: call
args: lint --root=.
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
test:
name: Unit Tests
# test:
# name: Unit Tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Run unit tests
# uses: dagger/dagger-for-github@v6
# with:
# version: latest
# verb: call
# args: test --root=.
# cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
e2e:
name: End-to-end Test all examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Run unit tests
# uses: dagger/dagger-for-github@v6
# with:
# version: latest
# verb: call
# args: test --root=.
# cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version: '1.23.6'
- name: Run all examples
run: ./scripts/test.sh
10 changes: 5 additions & 5 deletions benchmarks/event/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ nats_pid=$!
sleep 1

pushd "${SCRIPT_DIR}/.."
go mod download 1>/dev/null 2>&1
popd
go mod download

go run "${SCRIPT_DIR}/../cmd/handler/..." &
go run "./cmd/handler/..." &
handler_pid=$!
sleep 1

go run "${SCRIPT_DIR}/../cmd/request/..." --threads=2 --duration=5
go run "./cmd/request/..." --threads=2 --duration=5 --connections=6

kill "${handler_pid}" "${nats_pid}"
kill "${handler_pid}" "${nats_pid}"
popd

0 comments on commit 6864739

Please sign in to comment.