<commit_before>name: lua
on: [push, pull_request]
jobs:
  style:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: JohnnyMorganz/stylua-action@1.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --check .
          version: "0.14.0"
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: leafo/gh-actions-lua@v9
        with:
          luaVersion: luajit-2.1.0-beta3
      - name: Symlink luajit
        run: |
          pushd .lua/bin
          ln -s lua luajit
          popd
      - name: Build extension
        run: |
          pushd lua/wincent/commandt/lib
          make
          popd
      - name: Run tests
        run: bin/test.sh<commit_msg>test(lua): add DEBUG builds and stress tests<commit_after>name: lua
on: [push, pull_request]
jobs:
  style:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: JohnnyMorganz/stylua-action@1.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --check .
          version: "0.14.0"

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: leafo/gh-actions-lua@v9
        with:
          luaVersion: luajit-2.1.0-beta3

      - name: Symlink luajit
        run: |
          pushd .lua/bin
          ln -s lua luajit
          popd

      - name: Build extension (release)
        run: |
          pushd lua/wincent/commandt/lib
          make
          popd

      - name: Run unit tests (release)
        run: bin/test.sh

      - name: Run stress tests (release, benchmarks)
        run: TIMES=1 bin/benchmark/matcher.lua

      # Repeat the tests in DEBUG mode (ie. with `assert()` calls active).
      - name: Build extension (debug)
        run: |
          pushd lua/wincent/commandt/lib
          DEBUG=1 make
          popd

      - name: Run unit tests (debug)
        run: bin/test.sh

      - name: Run stress tests (debug, benchmarks)
        run: TIMES=1 bin/benchmark/matcher.lua
{'fraction_non_alphanumeric': 0.10600879335613092, 'fraction_numerical': 0.015144113336590131, 'mean_word_length': 1.5825977301387137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '739745', 'n_tokens_mistral': 711, 'n_tokens_neox': 677, 'n_words': 166}