<commit_before>name: CI
on: [push, pull_request]
jobs:
  build:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Get secrets
      run: |
        cd config
        mkdir secrets
        echo "${{ secrets.crowdin_key }}" > secrets/crowdin_key.txt

    - name: Webpack build
      run: |
        npm i
        npm run-script build

    - name: Start server
      run: npx http-server --port 8080 &

    - name: Audit URLs using Lighthouse
      uses: treosh/lighthouse-ci-action@v3
      with:
        urls: http://localhost:8080/
        uploadArtifacts: true # save results as an action artifacts
        temporaryPublicStorage: true # upload lighthouse report to the temporary storage
        runs: 3 # Asserting against a single run can lead to flaky performance assertions

    - name: Install dependencies
      run: |
        cd unit_tests
        # sudo apt-get install xvfb firefox
        python3 -m pip install -r requirements.txt

    - name: Gecko setup
      run: |
        wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
        sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.24.0-linux64.tar.gz -O > /usr/bin/geckodriver'
        sudo chmod +x /usr/bin/geckodriver
        rm geckodriver-v0.24.0-linux64.tar.gz
        export PATH=$PATH:/usr/bin/geckodriver

    - name: Test with pytest
      run: |
        cd unit_tests
        python3 -m pytest -s --cov=./ --cov-report=xml
        
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1<commit_msg>Nevermind codecov<commit_after>name: CI
on: [push, pull_request]
jobs:
  build:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Get secrets
      run: |
        cd config
        mkdir secrets
        echo "${{ secrets.crowdin_key }}" > secrets/crowdin_key.txt

    - name: Webpack build
      run: |
        npm i
        npm run-script build

    - name: Start server
      run: npx http-server --port 8080 &

    - name: Audit URLs using Lighthouse
      uses: treosh/lighthouse-ci-action@v3
      with:
        urls: http://localhost:8080/
        uploadArtifacts: true # save results as an action artifacts
        temporaryPublicStorage: true # upload lighthouse report to the temporary storage
        runs: 3 # Asserting against a single run can lead to flaky performance assertions

    - name: Install dependencies
      run: |
        cd unit_tests
        # sudo apt-get install xvfb firefox
        python3 -m pip install -r requirements.txt

    - name: Gecko setup
      run: |
        wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
        sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.24.0-linux64.tar.gz -O > /usr/bin/geckodriver'
        sudo chmod +x /usr/bin/geckodriver
        rm geckodriver-v0.24.0-linux64.tar.gz
        export PATH=$PATH:/usr/bin/geckodriver

    - name: Test with pytest
      run: |
        cd unit_tests
        python3 -m pytest -s --cov=./ --cov-report=xml
{'fraction_non_alphanumeric': 0.0944372574385511, 'fraction_numerical': 0.022315653298835704, 'mean_word_length': 2.099198396793587, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '783109', 'n_tokens_mistral': 1071, 'n_tokens_neox': 984, 'n_words': 275}