name: Rust

on:
  push:
    branches: [ "main", "dev" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    #runs-on: ubuntu-latest
    runs-on: windows-2022

    steps:
      - uses: actions/checkout@v3

      - name: Install 1.79
        run: rustup install 1.79

      - name: Set default toolchain
        run: rustup default 1.79

      - name: Build
        run: cargo build --verbose

      - name: Run tests
        run: cargo test --verbose