Skip to content

feat: log time

feat: log time #31

Workflow file for this run

name: Cross-Platform CI
on:
push:
branches: [ chore/windows-cancel-test ]
jobs:
test:
name: Run sleep example
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest]
include:
# - os: ubuntu-latest
# platform: Linux
- os: windows-latest
platform: Windows
# - os: macos-latest
# platform: macOS
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
# - name: Run sleep example on ${{ matrix.platform }}
# run: cargo run --example sleep
# timeout-minutes: 10
- name: build background server
run: cargo build --example server
- name: Start server in background
shell: powershell
run: |
Start-Process -FilePath "./target/debug/examples/server" -RedirectStandardOutput "server.log" -RedirectStandardError "server-error.log" -NoNewWindow
cargo run --example sqlx
- name: show logs
if: always()
shell: powershell
run: |
if (Test-Path "server.log") {
Write-Host "=== Server Output ==="
Get-Content "server.log"
}
if (Test-Path "server-error.log") {
Write-Host "=== Server Errors ==="
Get-Content "server-error.log"
}