name: Pipeline main branch

on:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest # Or other appropriate runner
    steps:
      - uses: actions/checkout@v4 # Checkout the repository
      - name: Install Rust toolchain
        run: |
          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
          source $HOME/.cargo/env
      - name: Run cargo build
        run: |
          source $HOME/.cargo/env
          /home/ubuntu/.cargo/bin/cargo build