Skip to content

Commit

Permalink
GH Actions (#375)
Browse files Browse the repository at this point in the history
* Fix whitespace

* (actions) add GH actions; update travis

* Fix missing semi-colon

* Drop unused concat task and related

* Add tests

* Run tests in CI

* (travis) remove travis

* (lint) ignore in grunt config

* don't use outdated cdn in browser tests

* (actions) build needs to be in sync with library

* build; add package-lock.json

* Remove bower.json
  • Loading branch information
MatthijsBurgh authored May 8, 2021
1 parent 2dc003c commit a5afc76
Show file tree
Hide file tree
Showing 22 changed files with 12,696 additions and 417 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
pull_request:
branches-ignore:
- develop

jobs:
ci:
name: ${{ matrix.node_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version: [14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- name: Install grunt-cli
run: npm install -g grunt-cli
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Build Check
run: |
echo -e "\e[1m\e[35mChecking build folder is up-to-date with library\e[0m"
changed_build_files=$(git -C "$(git rev-parse --show-toplevel)" diff --name-only HEAD -- build)
if [ -n "$changed_build_files" ]
then
echo -e "\e[1m\e[31mBuild folder is out-of-sync with library. Build library, npm run build, and (ammend) commit\e[0m"
exit 1
else
echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"
fi
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

17 changes: 3 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,10 @@ module.exports = function(grunt) {
build: {
configFile: './test/karma.conf.js',
singleRun: true,
browsers: ['PhantomJS']
browsers: process.env.CI ? ['FirefoxHeadless'] : ['Firefox'] // eslint-disable-line
}
},
watch: {
dev: {
options: {
interrupt: true
},
files: [
'./src/*.js',
'./src/**/*.js'
],
tasks: ['concat']
},
build_and_watch: {
options: {
interrupt: true
Expand Down Expand Up @@ -148,7 +138,6 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-jsdoc');
Expand All @@ -158,11 +147,11 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('gruntify-eslint');

grunt.registerTask('dev', ['concat', 'watch']);
grunt.registerTask('transpile', ['pipe', 'execute']);
grunt.registerTask('build', ['eslint:lint', 'pipe', 'shell']);
grunt.registerTask('build_and_watch', ['watch']);
grunt.registerTask('build_and_watch', ['build', 'watch']);
grunt.registerTask('doc', ['clean', 'jsdoc']);
grunt.registerTask('lint', ['eslint:lint',]);
grunt.registerTask('lint-fix', ['eslint:fix',]);
grunt.registerTask('test', ['karma',]);
};
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ros3djs [![Build Status](https://api.travis-ci.org/RobotWebTools/ros3djs.png)](https://travis-ci.org/RobotWebTools/ros3djs)
=======
# ros3djs

[![CI](https://github.com/RobotWebTools/ros3djs/actions/workflows/main.yml/badge.svg)](https://github.com/RobotWebTools/ros3djs/actions/workflows/main.yml)


#### 3D Visualization Library for use with the ROS JavaScript Libraries
For full documentation, see [the ROS wiki](http://ros.org/wiki/ros3djs) or check out some [working demos](http://robotwebtools.org/demos.html).
Expand Down
28 changes: 0 additions & 28 deletions bower.json

This file was deleted.

Loading

0 comments on commit a5afc76

Please sign in to comment.