File tree Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Run all tests
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - " main"
8
+ - " rc"
9
+ - " hotfix-rc"
10
+ workflow_dispatch :
11
+
12
+ defaults :
13
+ run :
14
+ shell : bash
15
+
16
+ env :
17
+ CARGO_TERM_COLOR : always
18
+
19
+ permissions :
20
+ contents : read
21
+
22
+ jobs :
23
+ test :
24
+ strategy :
25
+ fail-fast : false
26
+ matrix :
27
+ settings :
28
+ - os : macos-15
29
+ - os : windows-2025
30
+ - os : ubuntu-24.04
31
+
32
+ runs-on : ${{ matrix.settings.os }}
33
+ name : Run all tests - ${{ matrix.settings.os }}
34
+ steps :
35
+ - name : Checkout repo
36
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37
+ - name : Run tests
38
+ working-directory : ${{ github.workspace }}
39
+ run : ./scripts/bootstrap.sh all csharp
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
+ export DOTNET_CLI_TELEMETRY_OPTOUT=true
3
+ export DOTNET_NOLOGO=false
4
+
2
5
dotnet build --verbosity quiet
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- # shellcheck disable=SC3043,SC3044
2
+ # shellcheck disable=SC3043,SC3044,SC2155
3
3
set -euo pipefail
4
4
5
5
REPO_ROOT=" $( git rev-parse --show-toplevel) "
@@ -32,6 +32,17 @@ common_setup() {
32
32
cargo build --quiet > /dev/null
33
33
}
34
34
35
+ start_fake_server () {
36
+ # Start the fake server in background for testing
37
+ cargo run --bin fake-server &
38
+ echo $! > " ${TMP_DIR} " /fake_server.pid
39
+ # Wait for server to start
40
+ until curl -s " $SERVER_URL /health" > /dev/null 2>&1 ; do
41
+ echo " Waiting for fake server to start..."
42
+ sleep 1
43
+ done
44
+ }
45
+
35
46
main () {
36
47
local action=" $1 "
37
48
local language=" $2 "
@@ -75,6 +86,9 @@ main() {
75
86
echo " Failed to change directory to $dir "
76
87
exit 1
77
88
}
89
+
90
+ start_fake_server
91
+
78
92
. " $dir /test.sh"
79
93
popd > /dev/null || {
80
94
echo " Failed to return to previous directory"
@@ -88,4 +102,19 @@ main() {
88
102
esac
89
103
}
90
104
105
+ cleanup () {
106
+ # Stop the fake server if it was started
107
+ if [ -f " ${TMP_DIR} /fake_server.pid" ]; then
108
+ local pid=" $( cat " ${TMP_DIR} /fake_server.pid" ) "
109
+ echo " Stopping fake server..."
110
+ kill " $pid "
111
+ wait " $pid " || true
112
+ rm -f " ${TMP_DIR} /fake_server.pid"
113
+ fi
114
+
115
+ # Remove temporary directory
116
+ rm -rf " ${TMP_DIR} "
117
+ }
118
+
119
+ trap ' cleanup' EXIT
91
120
main " $@ "
You can’t perform that action at this time.
0 commit comments