1
0
mirror of synced 2024-11-21 20:46:07 +03:00

Add steps for linting, minification, start deployments

The deployment step is not yet finished and this required splitting linting from running tests.
This commit is contained in:
Kevin Brown 2019-09-10 19:44:27 -04:00
parent 6758bb50b9
commit ffd98a493b
2 changed files with 49 additions and 6 deletions

View File

@ -3,8 +3,8 @@ name: CI
on: [push, pull_request]
jobs:
tests:
name: "Tests"
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@ -12,7 +12,49 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 8
- name: "npm install"
- name: npm install
run: npm install
- name: "Run Grunt"
- name: Run linting
run: grunt compile lint
tests:
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]
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, tests, minify
run: grunt
- name: Deploy to NPM
run: "echo 'We made it here'"

View File

@ -250,7 +250,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-sass');
grunt.registerTask('default', ['compile', 'test', 'minify']);
grunt.registerTask('default', ['compile', 'test', 'lint', 'minify']);
grunt.registerTask('compile', [
'requirejs:dist', 'requirejs:dist.full', 'requirejs:i18n',
@ -258,5 +258,6 @@ module.exports = function (grunt) {
'sass:dev'
]);
grunt.registerTask('minify', ['uglify', 'sass:dist']);
grunt.registerTask('test', ['connect:tests', 'qunit', 'jshint']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('test', ['connect:tests', 'qunit']);
};