<commit_before>name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        node-version: [10.x, 12.x]
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run lint
    - run: npm test
      env:
        CI: true
    - run: npm run build
  package-ubuntu:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        node-version: 10.x
    - run: npm ci
    - name: Test npm package with minimal requirements
      run: |
        npm pack
        PACKAGE="exifreader-$(node -p "require('./package.json').version").tgz"
        mkdir my-project
        cd my-project
        PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/bin://'):/usr/local/bin/npm:/usr/local/bin/node
        npm init -y
        npm install ../$PACKAGE
        node -p "const {writeFileSync} = require('fs'); const packageJson = require('./package.json'); packageJson.exifreader = {include: {jpeg: true, exif: true}}; writeFileSync('package.json', JSON.stringify(packageJson));"
        npm rebuild exifreader
  package-windows:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        node-version: 10.x
    - run: npm ci
    - name: Test npm package with minimal requirements
      run: |
        npm pack
        $PackageVersion = ((node -p "require('./package.json').version") | Out-String).Trim()
        mkdir my-project
        cd my-project
        $regexRemovePath = [regex]::Escape('C:\npm\prefix')
        $arrPath = $env:Path -split ';' | Where-Object {$_ -notMatch "^$regexRemovePath\\?"}
        $env:Path = $arrPath -join ';'
        npm init -y
        npm install ..\exifreader-$($PackageVersion).tgz
        node -p "const {writeFileSync} = require('fs'); const packageJson = require('./package.json'); packageJson.exifreader = {include: {jpeg: true, exif: true}}; writeFileSync('package.json', JSON.stringify(packageJson));"
        npm rebuild exifreader
<commit_msg>Reduce number of CI configurations to run<commit_after>name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        include:
          - os: ubuntu-latest
            node-version: 12.x
          - os: windows-latest
            node-version: 10.x
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run lint
    - run: npm test
      env:
        CI: true
    - run: npm run build
  package-ubuntu:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        node-version: 10.x
    - run: npm ci
    - name: Test npm package with minimal requirements
      run: |
        npm pack
        PACKAGE="exifreader-$(node -p "require('./package.json').version").tgz"
        mkdir my-project
        cd my-project
        PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/bin://'):/usr/local/bin/npm:/usr/local/bin/node
        npm init -y
        npm install ../$PACKAGE
        node -p "const {writeFileSync} = require('fs'); const packageJson = require('./package.json'); packageJson.exifreader = {include: {jpeg: true, exif: true}}; writeFileSync('package.json', JSON.stringify(packageJson));"
        npm rebuild exifreader
  package-windows:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 12.x
      uses: actions/setup-node@v1
      with:
        node-version: 12.x
    - run: npm ci
    - name: Test npm package with minimal requirements
      run: |
        npm pack
        $PackageVersion = ((node -p "require('./package.json').version") | Out-String).Trim()
        mkdir my-project
        cd my-project
        $regexRemovePath = [regex]::Escape('C:\npm\prefix')
        $arrPath = $env:Path -split ';' | Where-Object {$_ -notMatch "^$regexRemovePath\\?"}
        $env:Path = $arrPath -join ';'
        npm init -y
        npm install ..\exifreader-$($PackageVersion).tgz
        node -p "const {writeFileSync} = require('fs'); const packageJson = require('./package.json'); packageJson.exifreader = {include: {jpeg: true, exif: true}}; writeFileSync('package.json', JSON.stringify(packageJson));"
        npm rebuild exifreader

{'fraction_non_alphanumeric': 0.1449454395717521, 'fraction_numerical': 0.0074119827053736875, 'mean_word_length': 2.2473262032085564, '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': '637064', 'n_tokens_mistral': 1633, 'n_tokens_neox': 1530, 'n_words': 388}