Browse Source

Create ci.yml

master
yuriy0803 2 years ago committed by GitHub
parent
commit
2281897dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 54
      .github/workflows/ci.yml

54
.github/workflows/ci.yml

@ -0,0 +1,54 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
- name: Setup node env 🏗
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Get yarn cache directory path 🛠
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules 📦
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies 👨🏻💻
run: yarn
- name: Run linter 👀
run: yarn lint
- name: Run tests 🧪
run: yarn test
- name: Run tests in new-web directory 📂
working-directory: new-web
run: yarn test
Loading…
Cancel
Save