name: calc

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: Cargo test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Install Rust stable toolchain
        uses: actions-rs/toolchain@v1.0.7
        with:
          profile: minimal
          toolchain: stable

      - name: Rust Cache
        uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

      - name: Cargo test
        uses: actions-rs/cargo@v1.0.3
        with:
          command: test
          args: --manifest-path=calc/Cargo.toml
