fix(tests/win): convert TELEMETRY_FILE env var to Windows path for da… #224
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| cmake \ | |
| ninja-build \ | |
| libsqlite3-dev \ | |
| python3-dev \ | |
| libssl-dev \ | |
| libffi-dev \ | |
| libcurl4-openssl-dev \ | |
| pkg-config | |
| - name: Build | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja | |
| ninja -C build naab-lang -j$(nproc) | |
| - name: Run tests | |
| run: | | |
| NAAB=build/naab-lang | |
| if [ ! -f "$NAAB" ]; then | |
| echo "Binary not found" | |
| exit 1 | |
| fi | |
| PASS=0 | |
| FAIL=0 | |
| for test_file in tests/test_match.naab tests/test_async.naab tests/test_go_executor.naab; do | |
| if [ -f "$test_file" ]; then | |
| echo "=== Testing: $test_file ===" | |
| if timeout 60 ./$NAAB "$test_file" 2>&1; then | |
| PASS=$((PASS + 1)) | |
| else | |
| echo "FAILED: $test_file" | |
| FAIL=$((FAIL + 1)) | |
| fi | |
| fi | |
| done | |
| echo "" | |
| echo "Results: $PASS passed, $FAIL failed" | |
| if [ $FAIL -gt 0 ]; then | |
| exit 1 | |
| fi |