<commit_before>name: Tests

on:
  push:
    branches:
      - master
  pull_request:

env:
  BATS_VERSION: v1.7.0

jobs:
  nix:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macos-10.15
          - macos-11
          - macos-12
          - ubuntu-18.04
          - ubuntu-20.04
          - ubuntu-22.04
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Install test dependencies
        if: runner.os == 'macos'
        run: brew install coreutils fish elvish

      - name: Install test dependencies
        if: runner.os == 'linux'
        run: |
          sudo add-apt-repository -y ppa:fish-shell/nightly-master
          sudo apt-get update
          sudo apt-get -y install fish curl

          # Download elvish binary and add to path
          curl https://dl.elv.sh/linux-amd64/elvish-v0.18.0.tar.gz -o elvish-v0.18.0.tar.gz
          tar xzf elvish-v0.18.0.tar.gz
          rm elvish-v0.18.0.tar.gz
          mkdir -p "$HOME/bin"
          mv elvish-v0.18.0 "$HOME/bin/elvish"
          echo "$HOME/bin" >>"$GITHUB_PATH"

      - name: Install bats
        run: |
          git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core
          echo "$HOME/bats-core/bin" >>"$GITHUB_PATH"

      - name: Run tests
        run: bats test
        env:
          GITHUB_API_TOKEN: ${{ github.token }}<commit_msg>fix: use ELVISH_VERSION to specify elvish test version (#1276)<commit_after>name: Tests

on:
  push:
    branches:
      - master
  pull_request:

env:
  BATS_VERSION: v1.7.0
  ELVISH_VERSION: v0.18.0

jobs:
  nix:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macos-10.15
          - macos-11
          - macos-12
          - ubuntu-18.04
          - ubuntu-20.04
          - ubuntu-22.04
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Install test dependencies
        if: runner.os == 'macos'
        run: brew install coreutils fish elvish

      - name: Install test dependencies
        if: runner.os == 'linux'
        run: |
          sudo add-apt-repository -y ppa:fish-shell/nightly-master
          sudo apt-get update
          sudo apt-get -y install fish curl

          # Download elvish binary and add to path
          curl https://dl.elv.sh/linux-amd64/elvish-${{ env.ELVISH_VERSION }}.tar.gz -o elvish-${{ env.ELVISH_VERSION }}.tar.gz
          tar xzf elvish-${{ env.ELVISH_VERSION }}.tar.gz
          rm elvish-${{ env.ELVISH_VERSION }}.tar.gz
          mkdir -p "$HOME/bin"
          mv elvish-${{ env.ELVISH_VERSION }} "$HOME/bin/elvish"
          echo "$HOME/bin" >>"$GITHUB_PATH"

      - name: Install bats
        run: |
          git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core
          echo "$HOME/bats-core/bin" >>"$GITHUB_PATH"

      - name: Run tests
        run: bats test
        env:
          GITHUB_API_TOKEN: ${{ github.token }}
{'fraction_non_alphanumeric': 0.1241747878025778, 'fraction_numerical': 0.026406790317510215, 'mean_word_length': 1.6341059602649006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '744564', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1090, 'n_words': 253}