Skip to content

merge:resolving conflicts #81

merge:resolving conflicts

merge:resolving conflicts #81

Workflow file for this run

name: Node.js CI With Cache
on:
push:
jobs:
dependencys:
name: dependencys
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: '14'
check-latest: true
- name: Get yarn cache directory path
id: npm-cache-dir-path
run: |
echo "::set-output name=dir::$(npm cache dir)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm install
- uses: actions/cache@v2
id: cache-build
with:
path: ./*
key: ${{ github.sha }}
build:
needs: dependencys
name: Npm install & build
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: npm run build --if-present
checkLint:
needs: build
name: Npm checkLint
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: npm run lint
teste-unitario:
needs: checkLint
name: Npm unitary test
runs-on: ubuntu-latest
environment: unit_test
steps:
- uses: actions/cache@v2
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: npm run test
coverage:
needs: teste-unitario
name: Npm coverage
runs-on: ubuntu-latest
environment: coverage
steps:
- uses: actions/cache@v2
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
- run: npm run test:cov