<commit_before>name: Run Test Suite

on: [push, pull_request]

env:
  SAS_BASE_DIR: sas

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        group: [1, 2, 3, 4, 5]

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python 3.8
      uses: actions/setup-python@v4
      with:
        python-version: 3.8
        cache: 'pip'
        cache-dependency-path: '**/setup.cfg'

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install ".[dev,web,db]"

    - name: Lint with flake8
      run: |
        pip install flake8
        # stop the build if there are Python syntax errors or undefined names
        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

    - name: Cache Files
      id: cache-sas
      uses: actions/cache@v3
      with:
        path: ${{ env.SAS_BASE_DIR }}
        key: ${{ runner.os }}-sas-${{ hashFiles('sas/**') }}
        restore-keys: |
          ${{ runner.os }}-sas-

    - name: Download and Check Data
      if: steps.cache-sas.outputs.cache-hit != 'true'
      run: |
        mkdir ${{ env.SAS_BASE_DIR }}
        python bin/get_test_data.py
        ls ${{ env.SAS_BASE_DIR }}/*
        find ${{ env.SAS_BASE_DIR }} -name '*'
        find ${{ env.SAS_BASE_DIR }} -name '*' | wc -l
        du -sh ${{ env.SAS_BASE_DIR }}

    - name: Setup SDSS-IV data netrc
      uses: extractions/netrc@v1
      with:
        machine: data.sdss.org
        username: ${{ secrets.S4_USERNAME }}
        password: ${{ secrets.S4_PASSWORD }}

    - name: Setup SDSS-IV api netrc
      uses: extractions/netrc@v1
      with:
        machine: api.sdss.org
        username: ${{ secrets.S4_USERNAME }}
        password: ${{ secrets.S4_PASSWORD }}

    - name: Run tests
      run: |
        pytest tests --splits 5 --group ${{ matrix.group }} --durations-path tests --local-only -m "not uses_web and not uses_db and not slow" --cov marvin --cov-report html<commit_msg>fixing durations path<commit_after>name: Run Test Suite

on: [push, pull_request]

env:
  SAS_BASE_DIR: sas

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        group: [1, 2, 3, 4, 5]

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python 3.8
      uses: actions/setup-python@v4
      with:
        python-version: 3.8
        cache: 'pip'
        cache-dependency-path: '**/setup.cfg'

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install ".[dev,web,db]"

    - name: Lint with flake8
      run: |
        pip install flake8
        # stop the build if there are Python syntax errors or undefined names
        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

    - name: Cache Files
      id: cache-sas
      uses: actions/cache@v3
      with:
        path: ${{ env.SAS_BASE_DIR }}
        key: ${{ runner.os }}-sas-${{ hashFiles('sas/**') }}
        restore-keys: |
          ${{ runner.os }}-sas-

    - name: Download and Check Data
      if: steps.cache-sas.outputs.cache-hit != 'true'
      run: |
        mkdir ${{ env.SAS_BASE_DIR }}
        python bin/get_test_data.py
        ls ${{ env.SAS_BASE_DIR }}/*
        find ${{ env.SAS_BASE_DIR }} -name '*'
        find ${{ env.SAS_BASE_DIR }} -name '*' | wc -l
        du -sh ${{ env.SAS_BASE_DIR }}

    - name: Setup SDSS-IV data netrc
      uses: extractions/netrc@v1
      with:
        machine: data.sdss.org
        username: ${{ secrets.S4_USERNAME }}
        password: ${{ secrets.S4_PASSWORD }}

    - name: Setup SDSS-IV api netrc
      uses: extractions/netrc@v1
      with:
        machine: api.sdss.org
        username: ${{ secrets.S4_USERNAME }}
        password: ${{ secrets.S4_PASSWORD }}

    - name: Run tests
      run: |
        pytest tests --splits 5 --group ${{ matrix.group }} --durations-path tests/.test_durations --local-only -m "not uses_web and not uses_db and not slow" --cov marvin --cov-report html
{'fraction_non_alphanumeric': 0.13247470101195952, 'fraction_numerical': 0.01701931922723091, 'mean_word_length': 1.972658920027341, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7288671', 'n_tokens_mistral': 1524, 'n_tokens_neox': 1424, 'n_words': 387}