<commit_before>name: build

on:
  # Trigger the workflow on push or pull request,
  # but only for the main branch
  push:
    branches:
      - master
  pull_request:
    branches:
      - '*'

jobs:
  qa:
    # Let's implement different jobs for Windows and Linux at some point, especially for packaging scripts
    runs-on: ubuntu-20.04

    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Display Node.js and npm informations
        run: |
          echo "node version $(node -v) running"
          echo "npm version $(npm -v) running"

      - name: Install dependencies
        run: npm ci

      - name: 'Test: formatting'
        run: 'npm run test:formatting'

      - name: 'Test: TS/JS linting'
        run: 'npm run test:lint'

      - name: 'Test: CSS linting'
        run: 'npm run test:css'

      - name: Build application
        run: npm run build

      - uses: actions/upload-artifact@v2
        with:
          name: application-build
          path: dist/

  # binaries-linux-windows:
  #   runs-on: ubuntu-20.04
  #   needs: [qa]

  #   steps:
  #     - uses: actions/checkout@v2

  #     - name: Use Node.js ${{ matrix.node-version }}
  #       uses: actions/setup-node@v1
  #       with:
  #         node-version: 14.x

  #     - name: Display Node.js and npm informations
  #       run: |
  #         echo "node version $(node -v) running"
  #         echo "npm version $(npm -v) running"

  #     - uses: actions/download-artifact@v2
  #       with:
  #         name: application-build
  #         path: dist/

  #     - name: Install Linux dependencies
  #       run: |
  #         sudo apt install --no-install-recommends -y libopenjp2-tools rpm gcc-multilib g++-multilib
  #         sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main'
  #         sudo add-apt-repository main
  #         sudo add-apt-repository universe
  #         sudo add-apt-repository multiverse
  #         sudo dpkg --add-architecture i386
  #         sudo apt-get update
  #         sudo apt-get install wine

  #     - name: Install production dependencies
  #       run: npm ci

  #     - name: Package Linux/Windows binaries
  #       run: npm run package:lw
  #       env:
  #         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  #     - uses: actions/upload-artifact@v2
  #       with:
  #         name: application-build
  #         path: |
  #           build/museeks-i386.deb
  #           build/museeks-amd64.deb
  #           build/museeks-i386.AppImage
  #           build/museeks-x86_64.AppImage
  #           build/museeks-i686.rpm
  #           build/museeks-x86_64.rpm
  #           build/museeks-setup.exe

  binaries-macos:
    runs-on: macos-11.0
    needs: [qa]

    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Display Node.js and npm informations
        run: |
          echo "node version $(node -v) running"
          echo "npm version $(npm -v) running"

      - uses: actions/download-artifact@v2
        with:
          name: application-build
          path: dist/

      - name: Install production dependencies
        run: npm ci

      - name: Package macOS binaries
        run: npm run package:m
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}<commit_msg>Adapt QA job to use yarn<commit_after>name: build

on:
  # Trigger the workflow on push or pull request,
  # but only for the main branch
  push:
    branches:
      - master
  pull_request:
    branches:
      - '*'

jobs:
  qa:
    # Let's implement different jobs for Windows and Linux at some point, especially for packaging scripts
    runs-on: ubuntu-20.04

    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Display Node.js and npm informations
        run: |
          echo "node version $(node -v) running"
          echo "npm version $(npm -v) running"

      - name: Install dependencies
        run: yarn install --frozen-lockfile

      - name: 'Test: formatting'
        run: 'yarn run test:formatting'

      - name: 'Test: TS/JS linting'
        run: 'yarn run test:lint'

      - name: 'Test: CSS linting'
        run: 'yarn run test:css'

      - name: Build application
        run: yarn run build

      - uses: actions/upload-artifact@v2
        with:
          name: application-build
          path: dist/

  # binaries-linux-windows:
  #   runs-on: ubuntu-20.04
  #   needs: [qa]

  #   steps:
  #     - uses: actions/checkout@v2

  #     - name: Use Node.js ${{ matrix.node-version }}
  #       uses: actions/setup-node@v1
  #       with:
  #         node-version: 14.x

  #     - name: Display Node.js and npm informations
  #       run: |
  #         echo "node version $(node -v) running"
  #         echo "npm version $(npm -v) running"

  #     - uses: actions/download-artifact@v2
  #       with:
  #         name: application-build
  #         path: dist/

  #     - name: Install Linux dependencies
  #       run: |
  #         sudo apt install --no-install-recommends -y libopenjp2-tools rpm gcc-multilib g++-multilib
  #         sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main'
  #         sudo add-apt-repository main
  #         sudo add-apt-repository universe
  #         sudo add-apt-repository multiverse
  #         sudo dpkg --add-architecture i386
  #         sudo apt-get update
  #         sudo apt-get install wine

  #     - name: Install dependencies
  #       run: yarn install --frozen-lockfile

  #     - name: Package Linux/Windows binaries
  #       run: yarn run package:lw
  #       env:
  #         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  #     - uses: actions/upload-artifact@v2
  #       with:
  #         name: application-build
  #         path: |
  #           build/museeks-i386.deb
  #           build/museeks-amd64.deb
  #           build/museeks-i386.AppImage
  #           build/museeks-x86_64.AppImage
  #           build/museeks-i686.rpm
  #           build/museeks-x86_64.rpm
  #           build/museeks-setup.exe

  binaries-macos:
    runs-on: macos-11.0
    needs: [qa]

    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Display Node.js and npm informations
        run: |
          echo "node version $(node -v) running"
          echo "npm version $(npm -v) running"

      - uses: actions/download-artifact@v2
        with:
          name: application-build
          path: dist/

      - name: Install production dependencies
        run: yarn install --frozen-lockfile

      - name: Package macOS binaries
        run: yarn run package:m
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
{'fraction_non_alphanumeric': 0.1044501133786848, 'fraction_numerical': 0.01417233560090703, 'mean_word_length': 1.6986615678776291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '91563', 'n_tokens_mistral': 2419, 'n_tokens_neox': 2215, 'n_words': 587}