Typeform/embed

View on GitHub
.github/workflows/pull-request-next.yml

Summary

Maintainability
Test Coverage
name: PR@next

on:
  pull_request:
    branches: [next]

env:
  EYES_API_KEY: ${{ secrets.EYES_API_KEY }}
  APPLITOOLS_BATCH_ID: ${{ github.event.pull_request.head.sha }}
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
  AWS_ASSETS_BUCKET: "typeform-public-assets/embed"
  PUBLIC_CDN_URL: "https://embed.typeform.com"

jobs:
  build-lint-test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node_version:
          - 10 # end of life 2021-04-30
          - 12 # end of life 2022-04-30
          - 14 # end of life 2023-04-30
          - 15 # current
    name: build-lint-test - node ${{ matrix.node_version }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node_version }}
      - uses: actions/cache@v2
        with:
          path: |
            **/node_modules
            ~/.cache
          key: ${{ runner.os }}-node-${{ matrix.node_version }}-modules-${{ hashFiles('**/yarn.lock') }}
      - run: yarn install  --frozen-lockfile
      - run: yarn lerna run build
      - run: yarn lerna run lint
      - uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
        with:
          coverageCommand: yarn --cwd packages/embed coverage
          coverageLocations: |
            ${{github.workspace}}/packages/embed/coverage/lcov.info:lcov
  functional:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
      - uses: actions/cache@v2
        with:
          path: |
            **/node_modules
            ~/.cache
          key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
      - run: yarn install  --frozen-lockfile
      - run: yarn lerna run test:functional
  visual:
    runs-on: ubuntu-latest
    if: github.event.pull_request.head.repo.full_name == github.repository
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
      - uses: actions/cache@v2
        with:
          path: |
            **/node_modules
            ~/.cache
          key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
      - run: yarn install  --frozen-lockfile
      - run: yarn lerna run test:visual