<commit_before>name: CI
on:
  push: {branches: [main]}
  pull_request:

jobs:
  analyze:
    name: "Static analysis"

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: cedx/setup-dart@v2
    - run: dart --version
    - run: pub get
    - run: dartanalyzer --fatal-infos --fatal-warnings .

  test:
    name: "Tests | Dart ${{ matrix.dart-channel }} | ${{ matrix.os }} | shard ${{ matrix.shard }}"

    strategy:
      matrix:
        os: [ubuntu, macos, windows]
        dart-channel: [stable, dev]
        shard: [0, 1, 2]
      fail-fast: false

    runs-on: ${{ matrix.os }}-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
    - run: node --version

    - uses: cedx/setup-dart@v2
      with:
        release-channel: ${{ matrix.dart-channel }}
    - run: dart --version

    - name: Configure Git
      run: |
        git config --global user.email "ci@local"
        git config --global user.name CI

    - run: pub get
    - run: pub run test -r expanded --total-shards 3 --shard-index ${{ matrix.shard }}

  format:
    name: "Code formatting"

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: cedx/setup-dart@v2
    - run: dart --version
    - run: dart format --fix .
    - run: git diff --exit-code<commit_msg>Use the official setup-dart action<commit_after>name: CI
on:
  push: {branches: [main]}
  pull_request:

jobs:
  analyze:
    name: "Static analysis"

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: dart-lang/setup-dart@v1
    - run: dart --version
    - run: pub get
    - run: dartanalyzer --fatal-infos --fatal-warnings .

  test:
    name: "Tests | Dart ${{ matrix.dart-channel }} | ${{ matrix.os }} | shard ${{ matrix.shard }}"

    strategy:
      matrix:
        os: [ubuntu, macos, windows]
        dart-channel: [stable, dev]
        shard: [0, 1, 2]
      fail-fast: false

    runs-on: ${{ matrix.os }}-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
    - run: node --version

    - uses: dart-lang/setup-dart@v1
      with:
        sdk: ${{ matrix.dart-channel }}
    - run: dart --version

    - name: Configure Git
      run: |
        git config --global user.email "<EMAIL>"
        git config --global user.name CI

    - run: pub get
    - run: pub run test -r expanded --total-shards 3 --shard-index ${{ matrix.shard }}

  format:
    name: "Code formatting"

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: dart-lang/setup-dart@v1
    - run: dart --version
    - run: dart format --fix .
    - run: git diff --exit-code
{'fraction_non_alphanumeric': 0.14634146341463414, 'fraction_numerical': 0.00825515947467167, 'mean_word_length': 2.015837104072398, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7426240', 'n_tokens_mistral': 991, 'n_tokens_neox': 924, 'n_words': 243}