47 lines
		
	
	
		
			882 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			882 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: ci
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     branches:
 | |
|       - main
 | |
|       - master
 | |
|   pull_request:
 | |
|     branches:
 | |
|       - main
 | |
|       - 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.2
 | |
|         with:
 | |
|           node-version: ${{ matrix.node }}
 | |
| 
 | |
|       - name: Cache node_modules 📦
 | |
|         uses: actions/cache@v2
 | |
|         with:
 | |
|           path: ~/.npm
 | |
|           key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
 | |
|           restore-keys: |
 | |
|             ${{ runner.os }}-node-            
 | |
| 
 | |
|       - name: Install dependencies 👨🏻💻
 | |
|         run: npm ci
 | |
| 
 | |
|       - name: Run linter 👀
 | |
|         run: npm run lint
 | |
| 
 | |
|       - name: Run tests 🧪
 | |
|         run: npm run test
 |