facebook/create-react-app

3 workflows · maturity 17% · 1 patterns · GitHub ↗

Security 0/100

Practices

✓ Matrix○ Permissions○ Security scan○ AI review○ Cache○ Concurrency✓ Reusable workflows

Detected patterns

Security dimensions

permissions
0
security scan
0
supply chain
0
secret handling
0
harden runner
0

Workflows (3)

build-and-test matrix .github/workflows/build-and-test.yml
Triggers
push, pull_request
Runs on
${{ matrix.os }}, ${{ matrix.os }}
Jobs
build, integration, e2e-simple, e2e-installs, e2e-kitchensink
Matrix
node, os→ 16, macos-latest, ubuntu-latest, windows-latest
Commands
  • npm ci --prefer-offline
  • npm run build
  • npm ci --prefer-offline
  • npm i -g yarn
  • npm run test:integration
View raw YAML
name: 'Build & Test'

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    name: 'Build (${{ matrix.os }}, Node ${{ matrix.node }})'
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - 'ubuntu-latest'
        node:
          - '16'
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
          cache: 'npm'
      - name: Install dependencies
        run: npm ci --prefer-offline
      - name: Build
        run: npm run build

  integration:
    name: 'Integration Tests (${{ matrix.os }}, Node ${{ matrix.node }})'
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - 'ubuntu-latest'
          - 'macos-latest'
          - 'windows-latest'
        node:
          - '16'
    steps:
      - uses: actions/checkout@v3
      - name: Setup node
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
          cache: 'npm'
      - name: Install dependencies
        run: npm ci --prefer-offline
      # The integration tests are run with yarn, so we need to install it.
      - name: Install yarn
        run: npm i -g yarn
      - name: Run integration tests
        run: npm run test:integration

  e2e-simple:
    name: E2E Simple
    uses: ./.github/workflows/e2e-base.yml
    with:
      testScript: 'tasks/e2e-simple.sh'

  e2e-installs:
    name: E2E Installs
    uses: ./.github/workflows/e2e-base.yml
    with:
      testScript: 'tasks/e2e-installs.sh'

  e2e-kitchensink:
    name: E2E Kitchensink
    uses: ./.github/workflows/e2e-base.yml
    with:
      testScript: 'tasks/e2e-kitchensink.sh'
e2e-base matrix .github/workflows/e2e-base.yml
Triggers
workflow_call
Runs on
${{ matrix.os }}
Jobs
test
Matrix
node, os→ 16, ubuntu-latest
Commands
  • npm ci --prefer-offline
  • git config --global core.autocrlf false git config --global user.name "Create React App" git config --global user.email "cra@email.com"
  • ${{ inputs.testScript }}
View raw YAML
on:
  workflow_call:
    inputs:
      testScript:
        required: true
        type: string

name: E2E

jobs:
  test:
    name: 'Test (${{ matrix.os }}, Node ${{ matrix.node }})'
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - 'ubuntu-latest'
        node:
          - '16'
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
          cache: 'npm'
      - name: Install
        run: npm ci --prefer-offline
      - name: Initialize Global Git config
        run: |
          git config --global core.autocrlf false
          git config --global user.name "Create React App"
          git config --global user.email "cra@email.com"
      - name: Run tests
        run: ${{ inputs.testScript }}
lint .github/workflows/lint.yml
Triggers
push, pull_request
Runs on
ubuntu-latest
Jobs
lint
Commands
  • npm ci --prefer-offline
  • npm run alex
  • npm run prettier -- --list-different
  • npm run eslint -- --max-warnings 0
View raw YAML
name: Lint

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '16'
          cache: 'npm'
      - name: Install
        run: npm ci --prefer-offline
      - name: Alex
        run: npm run alex
      - name: Prettier
        run: npm run prettier -- --list-different
      - name: Eslint
        run: npm run eslint -- --max-warnings 0