<commit_before>version: v1.0
name: Sitemap Test Pipeline
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804

blocks:

  - name: Customise PHP
    task:
      jobs:
        - name: Install iconv
          commands:
            - phpbrew ext install iconv
            
  - name: Install dependencies
    task:
      jobs:
        - name: Composer install
          commands:
            - checkout
            - cache restore composer-$SEMAPHORE_GIT_BRANCH-$(checksum composer.lock),composer-$SEMAPHORE_GIT_BRANCH,composer-master
            - composer install --prefer-dist --classmap-authoritative --no-interaction --no-progress
            - cache store composer-$(checksum composer.lock) vendor

  - name: "Test and Linting"
    task:
      prologue:
        commands:
          - checkout
          - cache restore composer-$SEMAPHORE_GIT_BRANCH-$(checksum composer.lock),composer-$SEMAPHORE_GIT_BRANCH,composer-master

      jobs:
        - name: Tests
          commands:
            - composer test
          
        - name: Linting
          commands:
            - composer lint<commit_msg>Install iconv<commit_after>version: v1.0
name: Sitemap Test Pipeline
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804

blocks:
  - name: Install dependencies
    task:
      jobs:
        - name: Composer install
          commands:
            - phpbrew ext install iconv
            - checkout
            - cache restore composer-$SEMAPHORE_GIT_BRANCH-$(checksum composer.lock),composer-$SEMAPHORE_GIT_BRANCH,composer-master
            - composer install --prefer-dist --classmap-authoritative --no-interaction --no-progress
            - cache store composer-$(checksum composer.lock) vendor

  - name: "Test and Linting"
    task:
      prologue:
        commands:
          - checkout
          - cache restore composer-$SEMAPHORE_GIT_BRANCH-$(checksum composer.lock),composer-$SEMAPHORE_GIT_BRANCH,composer-master
          - phpbrew ext install iconv

      jobs:
        - name: Tests
          commands:
            - composer test
          
        - name: Linting
          commands:
            - composer lint
{'fraction_non_alphanumeric': 0.08155699721964782, 'fraction_numerical': 0.0074142724745134385, 'mean_word_length': 1.8671978751660026, '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': '7426243', 'n_tokens_mistral': 646, 'n_tokens_neox': 628, 'n_words': 143}