name: GBCI on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: build: runs-on: gbo steps: - name: Disable SSL verification (temporary) run: git config --global http.sslVerify false - uses: actions/checkout@v4 - name: Install Rust uses: msrd0/rust-toolchain@trunk with: toolchain: stable - name: Run tests run: cargo test --all-features - name: Cache cargo registry uses: actions/cache@v3 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- - name: Build release binary uses: actions-rs/cargo@v1 with: command: build args: --workspace --release --locked # - name: Run tests # uses: actions-rs/cargo@v1 # with: # command: test # args: --release - name: Deploy binary run: | sudo cp ./target/release/gbserver /opt/gbo/bin/bot sudo chmod +x /opt/gbo/bin/bot/gbserver sudo systemctl restart gbserver