name: Long running tests

on:
  push:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always
  NUM_FUNCTIONAL_TEST_ITERATIONS: 20000

# Ensures that we cancel running jobs for the same PR / same workflow.
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  test:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Install stable
      uses: actions-rs/toolchain@v1
      with:
          toolchain: stable
          profile: minimal
          override: true

    - name: Run indexing_unsorted
      run: cargo test indexing_unsorted -- --ignored
    - name: Run indexing_sorted
      run: cargo test indexing_sorted -- --ignored
