-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from optimizely/EC3-1545-gha-migration
EC3-1545 migrate from travis.yml to GHA
- Loading branch information
Showing
11 changed files
with
91 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# .github/workflows/nodejs-ci.yml | ||
name: Run Tests for Nuclear JS | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
# Set up Node.js | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.18.1 | ||
|
||
# Install grunt-cli globally | ||
- name: Install grunt-cli | ||
run: npm install -g grunt-cli | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
# Run tests | ||
- name: Run tests | ||
run: grunt ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
coverage/ | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
module.exports = function(grunt) { | ||
require('load-grunt-config')(grunt) | ||
// load npm tasks | ||
grunt.loadNpmTasks('grunt-karma') | ||
grunt.loadNpmTasks('grunt-karma-coveralls') | ||
} | ||
module.exports = function (grunt) { | ||
// Load grunt configurations | ||
require('load-grunt-config')(grunt, { | ||
configPath: require('path').join(__dirname, 'grunt'), | ||
init: true, | ||
}); | ||
|
||
// Load npm tasks | ||
grunt.loadNpmTasks('grunt-karma'); | ||
grunt.loadNpmTasks('grunt-karma-coveralls'); | ||
|
||
// Default task for Chrome and Firefox | ||
grunt.registerTask('test', ['karma:chrome', 'karma:firefox']); | ||
|
||
// Separate task for Chrome only | ||
grunt.registerTask('test:chrome', ['karma:chrome']); | ||
|
||
// Separate task for Firefox only | ||
grunt.registerTask('test:firefox', ['karma:firefox']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
module.exports = { | ||
'test': [ | ||
'karma:phantom', | ||
'karma:chrome', | ||
'karma:firefox', | ||
], | ||
|
||
'sauce': [ | ||
'karma:sauce_modern', | ||
'karma:sauce_ie', | ||
'karma:sauce_mobile', | ||
], | ||
|
||
'ci': [ | ||
'eslint', | ||
'clean:coverage', | ||
'karma:coverage', | ||
'coveralls', | ||
//'sauce', TODO: investigate why sauce connect isnt working | ||
// 'coveralls', //doesn't seem to be a thing anymore. | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters