<commit_before><commit_msg>chore: add GitHub Actions config<commit_after>name: CI

on:
  push:
    branches:
      - main
      - master
      - 'v*'
  pull_request:

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2.4.0
      with:
        # necessary for commitlint-github-action
        fetch-depth: 0

    - uses: actions/setup-node@v2.4.1
      with:
        node-version: '6'
        cache: yarn

    - run: yarn install --frozen-lockfile
    - run: yarn lint:js
    - uses: wagoid/commitlint-github-action@v4
    - run: yarn ember ts:precompile

  test:
    name: Tests
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2.4.0
      - uses: actions/setup-node@v2.4.1
        with:
          node-version: '6'
          cache: yarn

      - run: yarn install --frozen-lockfile
      - run: yarn test

  try-scenarios:
    name: ember-try
    runs-on: ubuntu-latest
    needs: [lint, test]

    strategy:
      fail-fast: false
      matrix:
        ember-try-scenario:
          - ember-lts-2.12
          - ember-lts-2.16
          - ember-lts-2.18
          - ember-lts-3.4
          - ember-lts-3.8
          # disabled because the Ember.js 4 scenarios are not passing yet
          # - ember-release
          # - ember-beta
          # - ember-canary
          # disabled for now because it fails with a strange ember-data
          # installation error
          #- fastboot-addon-tests

    steps:
      - uses: actions/checkout@v2.4.0
      - uses: actions/setup-node@v2.4.1
        with:
          # some of the unlocked dependency versions that ember-try installs
          # are incompatible with Node.js 6
          node-version: '10'
          cache: yarn

      - run: yarn install --frozen-lockfile
      - run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }}

{'fraction_non_alphanumeric': 0.10599571734475374, 'fraction_numerical': 0.0208779443254818, 'mean_word_length': 1.6323943661971831, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '737162', 'n_tokens_mistral': 659, 'n_tokens_neox': 619, 'n_words': 146}