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:
parent
6758bb50b9
commit
ffd98a493b
50
.github/workflows/main.yml
vendored
50
.github/workflows/main.yml
vendored
@ -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'"
|
||||
|
@ -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']);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user