roguewave 0.1.0

An imperative remote server automation tool
Documentation
name: "Test Suite"
on:
  push:
  pull_request:

jobs:
  test-suite:
    name: Test Suite
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          toolchain: 1.80.1
          components: rustfmt, clippy
      - name: install extra tools
        run: cargo install --locked cargo-readme@3.3.1 taplo-cli@0.9.3
      - name: rustfmt
        uses: actions-rust-lang/rustfmt@v1
      - name: check Cargo.toml formatting
        run: taplo fmt --check --diff Cargo.toml
      - name: test
        run: |
          cat .github/workflows/ci_ssh_key.pub | sudo tee -a /root/.ssh/authorized_keys
          chmod 600 .github/workflows/ci_ssh_key
          eval $(ssh-agent)
          ssh-add .github/workflows/ci_ssh_key
          ssh -o StrictHostKeyChecking=no root@127.0.0.1 "echo ssh is available"
          export ROGUEWAVE_INTEGRATION_TEST_DESTINATION=root@127.0.0.1
          cargo test --locked
          cargo run --locked --example setup_http_server -- root@127.0.0.1 setup
          RESPONSE=$(curl http://127.0.0.1:20080/file1.txt)
          if [ "$RESPONSE" != "OK1" ]; then
              >&2 echo "Response failed"
              exit 1
          fi
          cargo run --locked --example setup_http_server -- root@127.0.0.1 stop
          if curl http://127.0.0.1:20080/file1.txt; then
              >&2 echo "Stopping failed"
              exit 1
          fi
          cargo run --locked --example setup_http_server -- root@127.0.0.1 start
          RESPONSE=$(curl http://127.0.0.1:20080/file1.txt)
          if [ "$RESPONSE" != "OK1" ]; then
              >&2 echo "Response failed"
              exit 1
          fi
      - name: clippy
        run: cargo clippy --locked --all-targets --all-features -- --deny warnings
      - name: check readme
        run: |
          cargo readme --output /tmp/README.md
          if ! diff README.md /tmp/README.md; then
            >&2 echo "README file is not up to date!"
            >&2 echo "run \"cargo readme --output README.md\""
            exit 1
          fi