name: Continuous integration
on: pull_request
jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Cache the node_modules dir
      uses: actions/cache@v2
      with:
        path: node_modules
        key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
    - name: Install
      run: yarn install --frozen-lockfile
    - name: Format
      run: make checkformatting
    - name: Lint & typecheck
      run: make lint
    - name: Test
      run: make test
    - name: Build packages
      run: |
        make clean # Remove assets from test step
        make build SETTINGS_FILE=settings/chrome-qa.json dist/ci-chrome-qa.zip
        make build SETTINGS_FILE=settings/chrome-prod.json dist/ci-chrome-prod.zip
        make build SETTINGS_FILE=settings/firefox-qa.json dist/ci-firefox-qa.xpi
        make build SETTINGS_FILE=settings/firefox-prod.json dist/ci-firefox-prod.xpi

name: Continuous integration
on:
  pull_request:
  workflow_call:
jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Cache the node_modules dir
      uses: actions/cache@v2
      with:
        path: node_modules
        key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
    - name: Install
      run: yarn install --frozen-lockfile
    - name: Format
      run: make checkformatting
    - name: Lint & typecheck
      run: make lint
    - name: Test
      run: make test
    - name: Build packages
      run: |
        make clean # Remove assets from test step
        make build SETTINGS_FILE=settings/chrome-qa.json dist/ci-chrome-qa.zip
        make build SETTINGS_FILE=settings/chrome-prod.json dist/ci-chrome-prod.zip
        make build SETTINGS_FILE=settings/firefox-qa.json dist/ci-firefox-qa.xpi
        make build SETTINGS_FILE=settings/firefox-prod.json dist/ci-firefox-prod.xpi

Enable CI workflow to be called from release workflow
Enable CI workflow to be called from release workflow
