tune emoji #4225
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
# Reduce ember's parallel-ness to 2, | |
# the number of cores available on github actions. | |
# See the following for details: | |
# https://git.io/vdao3 | |
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources | |
env: | |
JOBS: 2 | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Install the correct version of node | |
- name: Detect Node version | |
run: echo "##[set-output name=version;]$(cat .nvmrc)" | |
id: nvmrc | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nvmrc.outputs.version }}" | |
- uses: pnpm/action-setup@v2.0.1 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# Install dependencies | |
- name: Install dependencies | |
run: pnpm install | |
# Lint | |
- name: Lint files | |
run: | | |
pnpm lint:js | |
# yarn lint:hbs | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Install the correct version of node | |
- name: Detect Node version | |
run: echo "##[set-output name=version;]$(cat .nvmrc)" | |
id: nvmrc | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nvmrc.outputs.version }}" | |
- uses: pnpm/action-setup@v2.0.1 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# Install dependencies | |
- name: Install dependencies | |
run: pnpm install | |
# Run tests | |
- name: Run tests | |
run: pnpm coverage | |
# Store coverage info as artifact | |
- name: Persist coverage info | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report | |
path: coverage | |
# Upload coverage info to codecov | |
- name: Upload coverage info | |
if: github.event_name == 'push' | |
uses: codecov/codecov-action@v1 | |
with: | |
fail_ci_if_error: true | |
lighthouse: | |
name: Lighthouse Score | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Install the correct version of node | |
- name: Detect Node version | |
run: echo "##[set-output name=version;]$(cat .nvmrc)" | |
id: nvmrc | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nvmrc.outputs.version }}" | |
- uses: pnpm/action-setup@v2.0.1 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# Install dependencies | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run Lighthouse | |
run: | | |
mkdir lhci | |
pnpm lighthouse | |
continue-on-error: true | |
- name: Store generated report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lighthouse-report | |
path: lhci |