Merge pull request #111 from union-platform/dependabot/npm_and_yarn/e… #125
This file contains hidden or 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: Test | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Read Node version | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Set Node version | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
if: steps.yarn-cache-dir-path.outputs.cache-hit != 'true' | |
run: yarn | |
- name: Run tests | |
run: yarn test:ci |