<commit_before>box:
  id: cosyverif/docker-images:luax
  cmd: /bin/bash
build:
  steps:
    - script:
        name: "install"
        code: |
          for dir in /lua/lua*; do
            if [ -d "${dir}" ]; then
              "${dir}/bin/luarocks" make rockspec/layeredata-env-master-1.rockspec
              "${dir}/bin/luarocks" make rockspec/layeredata-master-1.rockspec
            fi
          done
    - script:
        name: "check"
        code: |
          luacheck src/
    - script:
        name: "test"
        code: |
          for dir in /lua/lua*; do
            if [ -d "${dir}" ]; then
              echo "${dir}"
              "${dir}/bin/busted" src/
            fi
          done
    - script:
        name: "upload to luarocks"
        code: |
          if [ "${WERCKER_GIT_BRANCH}" = "master" ]; then
            tag=$(git describe --tags --abbrev=0 || echo "0.0")
            count=$(git rev-list --count HEAD ^"${tag}" || git rev-list --count HEAD)
          else
            tag="${WERCKER_GIT_BRANCH}"
            count=$(git rev-list --count HEAD ^"${tag}" || git rev-list --count HEAD)
          fi
          cd rockspec || exit 1
          sed -e "s/master-1/${tag}-${count}/" \
              -e "s/master/${tag}/" \
            "layeredata-master-1.rockspec" \
            > "layeredata-${tag}-${count}.rockspec"
          luarocks upload \
            --force \
            --api-key="${LUAROCKS_TOKEN}" \
            "layeredata-${tag}-${count}.rockspec"
          cd ..
  after-steps:
    - script:
        name: "export to coveralls"
        code: |
          luacov-coveralls \
            --repo-token "${COVERALLS_TOKEN}" \
            --exclude share --exclude busted --exclude _spec \
            --include layeredata \
            --root src/ \
            --service-name "${WERCKER_GIT_BRANCH}"<commit_msg>Add slack to wercker configuration.<commit_after>box:
  id: cosyverif/docker-images:luax
  cmd: /bin/bash
build:
  steps:
    - script:
        name: "install"
        code: |
          for dir in /lua/lua*; do
            if [ -d "${dir}" ]; then
              "${dir}/bin/luarocks" make rockspec/layeredata-env-master-1.rockspec
              "${dir}/bin/luarocks" make rockspec/layeredata-master-1.rockspec
            fi
          done
    - script:
        name: "check"
        code: |
          luacheck src/
    - script:
        name: "test"
        code: |
          for dir in /lua/lua*; do
            if [ -d "${dir}" ]; then
              echo "${dir}"
              "${dir}/bin/busted" src/
            fi
          done
    - script:
        name: "upload to luarocks"
        code: |
          if [ "${WERCKER_GIT_BRANCH}" = "master" ]; then
            tag=$(git describe --tags --abbrev=0 || echo "0.0")
            count=$(git rev-list --count HEAD ^"${tag}" || git rev-list --count HEAD)
            cd rockspec || exit 1
            sed -e "s/master-1/${tag}-${count}/" \
                -e "s/master/${tag}/" \
              "layeredata-master-1.rockspec" \
              > "layeredata-${tag}-${count}.rockspec"
            luarocks upload \
              --force \
              --api-key="${LUAROCKS_TOKEN}" \
              "layeredata-${tag}-${count}.rockspec"
            cd ..
          fi
  after-steps:
    - slack-notifier:
        url: $SLACK_URL
        channel: developers
        username: CosyVerif
        branch: ${WERCKER_GIT_BRANCH}
    - script:
        name: "export to coveralls"
        code: |
          luacov-coveralls \
            --repo-token "${COVERALLS_TOKEN}" \
            --exclude share --exclude busted --exclude _spec \
            --include layeredata \
            --root src/ \
            --service-name "${WERCKER_GIT_BRANCH}"
{'fraction_non_alphanumeric': 0.14923776410805029, 'fraction_numerical': 0.004279219042524739, 'mean_word_length': 1.3316708229426435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6759275', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1184, 'n_words': 259}