name: Rust CI # Name of the GitHub Actions workflow
on: # Specifies when the workflow should run
push:
branches: # Triggers on push to the main branch
pull_request:
branches: # Triggers on pull requests to the main branch
jobs:
test: # Defines a job called "test"
name: Run Unit Tests # A more descriptive name for the job
runs-on: ubuntu-latest # Specifies the type of virtual host environment
steps: # Steps to execute in the job
- uses: actions/checkout@v2
# This step checks out your repository under $GITHUB_WORKSPACE, so the job can access it
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable # Specifies which Rust toolchain to use
profile: minimal # Installs the minimal profile to speed up installation
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test # Uses cargo to run the test command
args: --verbose # Optional: provides more detailed output