Add ci to auto-build and do simple smoke test #1
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: Integration Test | |
| on: | |
| repository_dispatch: | |
| types: [upstream-changed] | |
| push: | |
| branches: [kotlin] | |
| pull_request: | |
| branches: [kotlin] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Install Rust | |
| run: | | |
| rustup update stable --no-self-update && rustup default stable | |
| rustup install 1.87 1.89 | |
| rustup target add x86_64-unknown-none | |
| - name: Install clang | |
| run: sudo apt-get install -y clang | |
| - uses: extractions/setup-just@v2 | |
| - name: Install wasm-tools | |
| run: cargo install wasm-tools | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Build | |
| run: just build | |
| - name: Smoke test | |
| run: | | |
| just run & | |
| SERVER_PID=$! | |
| trap "kill $SERVER_PID 2>/dev/null || true" EXIT | |
| for i in $(seq 1 30); do | |
| if curl -s http://localhost:3000 > /dev/null 2>&1; then | |
| break | |
| fi | |
| sleep 4 | |
| done | |
| ./smokeTest.sh |