2019-09-11 02:21:22 +03:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2019-09-11 02:44:27 +03:00
|
|
|
linting:
|
|
|
|
name: Linting
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js 8
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 8
|
|
|
|
- name: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Run linting
|
|
|
|
run: grunt compile lint
|
2019-09-11 02:28:41 +03:00
|
|
|
tests:
|
2019-09-11 02:44:27 +03:00
|
|
|
name: Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js 8
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 8
|
|
|
|
- name: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Run tests
|
|
|
|
run: grunt compile test
|
|
|
|
minification:
|
|
|
|
name: Minification
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js 8
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 8
|
|
|
|
- name: npm install
|
|
|
|
run: npm install
|
|
|
|
- name: Run minification
|
|
|
|
run: grunt compile minify
|
|
|
|
deploy:
|
|
|
|
name: Deploy
|
|
|
|
needs: [linting, tests, minification]
|
2019-09-11 02:28:41 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js 8
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 8
|
2019-09-11 02:44:27 +03:00
|
|
|
- name: npm install
|
2019-09-11 02:28:41 +03:00
|
|
|
run: npm install
|
2019-09-11 02:44:27 +03:00
|
|
|
- name: Run linting, tests, minify
|
2019-09-11 02:28:41 +03:00
|
|
|
run: grunt
|
2019-09-11 02:44:27 +03:00
|
|
|
- name: Deploy to NPM
|
|
|
|
run: "echo 'We made it here'"
|