name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build:          
    runs-on: ubuntu-latest
    steps:
      - name: Checkout (GitHub)
        uses: actions/checkout@v3
      - name: Run tests in devcontainer
        uses: devcontainers/ci@v0.3
        with:
          push: never
          runCmd: |
            cargo test
  
  stack_overflow_tests:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Rust Nightly
      run: rustup toolchain install nightly
    - name: Build
      run: cargo build
    - name: Run tests
      run: cargo test --test run_stack_overflow_tests -- --include-ignored --test-threads=1