<commit_before>name: Node CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Install Node.js
      uses: actions/setup-node@v1
      with:
        node-version: 12.x
    - name: Set up build cache (yarn)
      uses: actions/cache@v1
      with:
        path: ~/.cache/yarn
        key: ${{ runner.os }}-${{ hashFiles('/**/yarn.lock') }}
    - name: Checkout
      uses: actions/checkout@v1
    - name: Start prereqs
      run: |
        docker network create cardstack
        docker run -d --rm --network cardstack -p 5444:5432 --name postgres cardstack/pg-test
        docker run -d --rm --network cardstack -p 8838:80 --name git-http cardstack/git-http-server;
    - name: yarn install
      run: yarn install
    - name: Linting
      run: |
        yarn lint:deps
        yarn lint:js
    - name: Node tests
      run: yarn node-tests
      env:
        PGHOST: localhost
        PGPORT: 5444
        PGUSER: postgres
    - name: Ember tests with percy
      if: github.event_name == 'pull_request'
      run: yarn ember-tests
      env:
        CI: true
        PGHOST: localhost
        PGPORT: 5444
        PGUSER: postgres
        PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

    - name: Ember tests without percy
      if: github.event_name != 'pull_request'
      run: yarn ember-tests
      env:
        PGHOST: localhost
        PGPORT: 5444
        PGUSER: postgres
<commit_msg>fix ember test env vars<commit_after>name: Node CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Install Node.js
      uses: actions/setup-node@v1
      with:
        node-version: 12.x
    - name: Set up build cache (yarn)
      uses: actions/cache@v1
      with:
        path: ~/.cache/yarn
        key: ${{ runner.os }}-${{ hashFiles('/**/yarn.lock') }}
    - name: Checkout
      uses: actions/checkout@v1
    - name: Start prereqs
      run: |
        docker network create cardstack
        docker run -d --rm --network cardstack -p 5444:5432 --name postgres cardstack/pg-test
        docker run -d --rm --network cardstack -p 8838:80 --name git-http cardstack/git-http-server;
    - name: yarn install
      run: yarn install
    - name: Linting
      run: |
        yarn lint:deps
        yarn lint:js
    - name: Node tests
      run: yarn node-tests
      env:
        PGHOST: localhost
        PGPORT: 5444
        PGUSER: postgres
    - name: Ember tests with percy
      if: github.event_name == 'pull_request'
      run: yarn ember-tests
      env:
        PGHOST: localhost
        PGPORT: 5444
        PGUSER: postgres
        PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

    - name: Ember tests without percy
      if: github.event_name != 'pull_request'
      run: yarn ember-tests
      env:
        PGHOST: localhost
        PGPORT: 5444
        PGUSER: postgres

{'fraction_non_alphanumeric': 0.1030469017459774, 'fraction_numerical': 0.021910304690174597, 'mean_word_length': 1.873156342182891, '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': '3598882', 'n_tokens_mistral': 1024, 'n_tokens_neox': 946, 'n_words': 272}