<commit_before>name: Mutation testing

on:
  schedule:
    - cron:  '14 3 * * *'

jobs:
  mutation-testing:
    runs-on: ubuntu-latest
    container: node:10.18-jessie

    services:
      postgres:
        image: postgres:9.3
        ports:
          - 5432:5432
        env:
          POSTGRES_DB: hyperion
          POSTGRES_PASSWORD: <PASSWORD>
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up cache for SBT
        uses: actions/cache@v1
        with:
          path: |
            ~/.sbt
            ./.ivy2
            ~/.coursier
            ~/tools
          key: hyperion-{{ checksum "build.sbt" }}
          restore-keys: |
            hyperion-

      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 11
      
      - name: Download SBT
        run: |
          cd /tmp
          curl -L -o sbt-1.3.13.tgz https://piccolo.link/sbt-1.3.13.tgz
          tar -xzf sbt*tgz
    
      - name: Populate database
        run: |
          apt-get update
          apt-get install -y postgresql-client-9.4
          psql -h postgres -p 5432 -f scripts/database/schema.sql hyperion
          psql -h postgres -p 5432 -f scripts/database/test-data.sql hyperion
        env:
          PGUSER: postgres
          PGPASSWORD: <PASSWORD>
        
      - name: Run Stryker
        run: /tmp/sbt/bin/sbt -Dconfig.file=../.circleci/environment.conf "project app" stryker
        env:
          SBT_OPTS: "-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=4G -Xmx4G"
          STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}<commit_msg>Download SBT straight from GitHub<commit_after>name: Mutation testing

on:
  schedule:
    - cron:  '14 3 * * *'

jobs:
  mutation-testing:
    runs-on: ubuntu-latest
    container: node:10.18-jessie

    services:
      postgres:
        image: postgres:9.3
        ports:
          - 5432:5432
        env:
          POSTGRES_DB: hyperion
          POSTGRES_PASSWORD: <PASSWORD>
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up cache for SBT
        uses: actions/cache@v1
        with:
          path: |
            ~/.sbt
            ./.ivy2
            ~/.coursier
            ~/tools
          key: hyperion-{{ checksum "build.sbt" }}
          restore-keys: |
            hyperion-

      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 11
      
      - name: Download SBT
        run: |
          cd /tmp
          curl -L -o sbt-${SBT_VERSION}.tgz https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.tgz
          tar -xzf sbt-${SBT_VERSION}.tgz
        env:
          SBT_VERSION: 1.3.13
    
      - name: Populate database
        run: |
          apt-get update
          apt-get install -y postgresql-client-9.4
          psql -h postgres -p 5432 -f scripts/database/schema.sql hyperion
          psql -h postgres -p 5432 -f scripts/database/test-data.sql hyperion
        env:
          PGUSER: postgres
          PGPASSWORD: postgres
        
      - name: Run Stryker
        run: /tmp/sbt/bin/sbt -Dconfig.file=../.circleci/environment.conf "project app" stryker
        env:
          SBT_OPTS: "-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=4G -Xmx4G"
          STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
{'fraction_non_alphanumeric': 0.10412147505422993, 'fraction_numerical': 0.02440347071583514, 'mean_word_length': 1.480833893745797, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '6703978', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1220, 'n_words': 265}