name: Test standard library

on:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: freckle/stack-action@v5
      - name: Install hyperfine
        run: sudo apt-get install hyperfine
      - name: Install bruijn
        run: stack install
      - name: Run HigherOrder tests and measure time
        run: cd std/ && ./test_all.sh HigherOrder
      - name: Run RKNL tests and measure time
        run: cd std/ && ./test_all.sh RKNL
      - name: Run ION tests and measure time
        run: cd std/ && ./test_all.sh ION