<commit_before>name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  schedule:
    - cron: "0 7 * * *"
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Run ${{ matrix.jobs.name }} with Rust ${{ matrix.rust }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        rust: [stable]
        jobs:
          - name: Clippy
            task: cargo clippy --workspace --all-targets --verbose
          - name: tests
            task: cargo test --workspace --verbose
          - name: fmt
            task: cargo fmt --all -- --check
        include:
          - name: Clippy
            env:
              RUSTFLAGS: -Dwarnings
    steps:
      - uses: actions/checkout@v2
      - name: Prepare Rust
        uses: hecrj/setup-rust-action@v1
        with:
          rust-version: ${{ matrix.rust }}
          components: clippy, rustfmt
      - name: Cache cargo registry
        uses: actions/cache@v2
        continue-on-error: false
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-    
      - name: Run task ${{ matrix.jobs.name }}
        run: ${{ matrix.jobs.task }}
  <commit_msg>Add code coverage job<commit_after>name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  schedule:
    - cron: "0 7 * * *"
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Run ${{ matrix.jobs.name }} with Rust ${{ matrix.rust }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        rust: [stable]
        jobs:
          - name: Clippy
            task: cargo clippy --workspace --all-targets --verbose
          - name: tests
            task: cargo test --workspace --verbose
          - name: fmt
            task: cargo fmt --all -- --check
        include:
          - name: Clippy
            env:
              RUSTFLAGS: -Dwarnings
    steps:
      - uses: actions/checkout@v2
      - name: Prepare Rust
        uses: hecrj/setup-rust-action@v1
        with:
          rust-version: ${{ matrix.rust }}
          components: clippy, rustfmt
      - name: Cache cargo registry
        uses: actions/cache@v2
        continue-on-error: false
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-    
      - name: Run task ${{ matrix.jobs.name }}
        run: ${{ matrix.jobs.task }}
  
  coverage:
    name: Tarpaulin coverage
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
      - name: Run cargo-tarpaulin
        uses: actions-rs/tarpaulin@v0.1
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1.0.2
        with:
          token: ${{secrets.CODECOV_TOKEN}}
      - name: Archive code coverage results
        uses: actions/upload-artifact@v1
        with:
          name: code-coverage-report
          path: cobertura.xml
{'fraction_non_alphanumeric': 0.1260092272202999, 'fraction_numerical': 0.005190311418685121, 'mean_word_length': 1.5601476014760147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '4502071', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1064, 'n_words': 262}