<commit_before>kind: pipeline
type: docker
name: test

volumes:
  - name: npmrc
    host:
      path: /home/albertyw/.ssh/other/npmrc

steps:
  - name: Test Node
    image: node:16
    commands:
      - apt-get update && apt-get install -y fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libcups2 libgbm1 libgtk-3-0 libnspr4 libnss3 libx11-xcb1 libxss1 libxtst6 lsb-release xdg-utils
      - npm ci
      - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter" && chmod +x "${HOME}/bin/cc-test-reporter"
      - chmod +x "${HOME}/bin/cc-test-reporter"
      - cc-test-reporter before-build
      - npm test
      - exitcode="$?"
      - cc-test-reporter after-build --exit-code "$exitcode"
    environment:
      CC_TEST_REPORTER_ID: 272eecf2546da3d8959201092992794402b86f42235d3e1b489a2a5c67e23ad4

  - name: Test Packaging
    image: node:16
    commands:
      - apt-get update && apt-get install -y zip
      - npm ci
      - npm run package

  - name: Publish Node
    image: node:16
    commands:
      - npm whoami
      - npm publish
    volumes:
      - name: npmrc
        path: /root/.npmrc
    depends_on:
      - Test Node
      - Test Packaging
    when:<commit_msg>Switch to node docker image with chromium already set up<commit_after>kind: pipeline
type: docker
name: test

volumes:
  - name: npmrc
    host:
      path: /home/albertyw/.ssh/other/npmrc

steps:
  - name: Test Node
    image: satantime/puppeteer-node:17.2-bullseye-slim
    commands:
      - npm ci
      - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter" && chmod +x "${HOME}/bin/cc-test-reporter"
      - chmod +x "${HOME}/bin/cc-test-reporter"
      - cc-test-reporter before-build
      - npm test
      - exitcode="$?"
      - cc-test-reporter after-build --exit-code "$exitcode"
    environment:
      CC_TEST_REPORTER_ID: 272eecf2546da3d8959201092992794402b86f42235d3e1b489a2a5c67e23ad4

  - name: Test Packaging
    image: node:16
    commands:
      - apt-get update && apt-get install -y zip
      - npm ci
      - npm run package

  - name: Publish Node
    image: node:16
    commands:
      - npm whoami
      - npm publish
    volumes:
      - name: npmrc
        path: /root/.npmrc
    depends_on:
      - Test Node
      - Test Packaging
    when:
{'fraction_non_alphanumeric': 0.1127287853577371, 'fraction_numerical': 0.0524126455906822, 'mean_word_length': 2.3402777777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '588001', 'n_tokens_mistral': 954, 'n_tokens_neox': 867, 'n_words': 189}