remove yarn.lock #437
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 }}" | |
# Restore yarn cache from between builds | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore dependencies from cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Lint | |
- name: Lint files | |
run: | | |
yarn 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 }}" | |
# Restore yarn cache from between builds | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore dependencies from cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Run tests | |
- name: Run tests | |
run: yarn 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 }}" | |
# Restore yarn cache from between builds | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore dependencies from cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
- name: Run Lighthouse | |
run: | | |
mkdir lhci | |
yarn lighthouse | |
continue-on-error: true | |
- name: Store generated report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lighthouse-report | |
path: lhci |