Skip to content

Commit

Permalink
chore: Update development environment
Browse files Browse the repository at this point in the history
* Migrate from Travis to GitHub Actions
* Replace grunt-istanbul with c8
* Replace grunbt-standard with denolint
* Publish automatically using semantic-release
  • Loading branch information
prantlf committed Jun 14, 2022
1 parent eed11ef commit c9e0703
Show file tree
Hide file tree
Showing 10 changed files with 1,512 additions and 2,632 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test or Release

on:
- push
- pull_request

jobs:
test-or-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: '>=6'
run_install: |
- args: [--frozen-lockfile, --no-verify-store-integrity]
- name: Test
run: npm test
- name: Coverage
uses: codecov/codecov-action@v2
- name: Publish
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 18
branches: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.DS_Store
coverage
node_modules
npm-debug.log
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"coverage": true,
"node_modules": true,
"npm-debug.log": true
"**/node_modules": true
},
"search.exclude": {
"**/coverage": true,
"**/node_modules": true
}
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [0.0.3](https://github.com/prantlf/grunt-chromedriver/compare/v0.0.2...v0.0.3) (2021-02-08)

### Bug Fixes

* Upgrade to chromedriver 88 ([2973b9e](https://github.com/prantlf/grunt-chromedriver/commit/2973b9e9cf41945913489cfd38f13718126b2e95))

## [0.0.2](https://github.com/prantlf/grunt-chromedriver/compare/v0.0.1...v0.0.2) (2020-10-20)

### Bug Fixes

* Upgrade to chromedriver 86 ([e41dd68](https://github.com/prantlf/grunt-chromedriver/commit/e41dd68849b11e977abbb621fd4ffc228c989e88))

## 0.0.1 (2020-07-26)

Initial release chromedriver 84
45 changes: 4 additions & 41 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = function (grunt) {
const coverage = grunt.option('coverage')
const alternativePort = '9517'

grunt.initConfig({
Expand All @@ -10,61 +9,25 @@ module.exports = function (grunt) {
fail: { args: ['--invalid'] }
},

standard: {
all: {
src: [
'Gruntfile.js',
'tasks/**/*.js',
'<%= nodeunit.started %>',
'<%= nodeunit.stopped %>'
]
}
},

instrument: {
files: 'tasks/**/*.js',
options: {
lazy: true,
basePath: 'coverage/'
}
},

storeCoverage: {
options: { dir: 'coverage' }
},

makeReport: {
src: 'coverage/coverage.json',
options: {
type: 'lcov',
dir: 'coverage',
print: 'detail'
}
},

nodeunit: {
started: ['test/started.js'],
stopped: ['test/stopped.js']
}
})

grunt.loadNpmTasks('grunt-contrib-nodeunit')
grunt.loadNpmTasks('grunt-istanbul')
grunt.loadNpmTasks('grunt-standard')
grunt.loadTasks(coverage ? 'coverage/tasks' : 'tasks')
grunt.loadTasks('tasks')

process.env.CHROMEDRIVER_PORT = undefined
grunt.registerTask('switchPort', 'Grunt task switching the chromedriver port.', function () {
process.env.CHROMEDRIVER_PORT = alternativePort
})

let test = [
'standard', 'nodeunit:stopped', 'chromedriver:quiet:start',
grunt.registerTask('default', [
'nodeunit:stopped', 'chromedriver:quiet:start',
'nodeunit:started', 'chromedriver:quiet:stop',
'nodeunit:stopped', 'chromedriver:verbose:start', 'switchPort',
'nodeunit:started', 'chromedriver:verbose:stop', 'nodeunit:stopped',
'chromedriver:otherPort:start', 'nodeunit:started'
]
if (coverage) test = test.concat(['storeCoverage', 'makeReport'])
grunt.registerTask('default', test)
])
}
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# grunt-chromedriver
[![NPM version](https://badge.fury.io/js/grunt-chromedriver.png)](http://badge.fury.io/js/grunt-chromedriver)
[![Build Status](https://travis-ci.org/prantlf/grunt-chromedriver.png)](https://travis-ci.org/prantlf/grunt-chromedriver)
[![codecov](https://codecov.io/gh/prantlf/grunt-chromedriver/branch/master/graph/badge.svg)](https://codecov.io/gh/prantlf/grunt-chromedriver)
[![codebeat badge](https://codebeat.co/badges/1777e780-ea70-4ebd-8f5a-df278c5761d6)](https://codebeat.co/projects/github-com-prantlf-grunt-chromedriver-master)
[![Dependency Status](https://david-dm.org/prantlf/grunt-chromedriver.svg)](https://david-dm.org/prantlf/grunt-chromedriver)
[![devDependency Status](https://david-dm.org/prantlf/grunt-chromedriver/dev-status.svg)](https://david-dm.org/prantlf/grunt-chromedriver#info=devDependencies)
[![peerDependency Status](https://david-dm.org/prantlf/grunt-chromedriver/peer-status.svg)](https://david-dm.org/prantlf/grunt-chromedriver#info=peerDependencies)

[![NPM Downloads](https://nodei.co/npm/grunt-chromedriver.png?downloads=true&stars=true)](https://www.npmjs.com/package/grunt-chromedriver)
[![Latest version](https://img.shields.io/npm/v/grunt-chromedriver)
![Dependency status](https://img.shields.io/librariesio/release/npm/grunt-chromedriver)
](https://www.npmjs.com/package/grunt-chromedriver)
[![Coverage](https://codecov.io/gh/prantlf/grunt-chromedriver/branch/master/graph/badge.svg)](https://codecov.io/gh/prantlf/grunt-chromedriver)
[![codebeat badge](https://codebeat.co/badges/1777e780-ea70-4ebd-8f5a-df278c5761d6)](https://codebeat.co/projects/github-com-prantlf-grunt-chromedriver-master)

Controls Chrome or Chromium using the WebDriver interface via chromedriver without Selenium.

Expand Down
49 changes: 40 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-chromedriver",
"description": "Controls Chrome or Chromium using the WebDriver interface via chromedriver without Selenium.",
"version": "0.0.0-development",
"version": "0.0.3",
"homepage": "https://github.com/prantlf/grunt-chromedriver#readme",
"author": {
"name": "Ferdinand Prantl",
Expand Down Expand Up @@ -29,21 +29,52 @@
"tasks"
],
"scripts": {
"lint": "grunt standard",
"test": "grunt",
"coverage": "grunt instrument && grunt --coverage"
"lint": "denolint",
"check": "grunt",
"test": "denolint && c8 grunt"
},
"c8": {
"include": [
"tasks"
],
"check-coverage": true,
"reporter": [
"text",
"lcov"
],
"branches": 100,
"lines": 100,
"functions": 100,
"statements": 100
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/github",
{
"failComment": false
}
],
"@semantic-release/git"
]
},
"dependencies": {
"chromedriver": "102.0.0",
"portscanner": "2.2.0"
},
"devDependencies": {
"grunt": "1.2.1",
"grunt-contrib-nodeunit": "2.1.0",
"grunt-istanbul": "0.8.0",
"grunt-standard": "3.2.0",
"@node-rs/deno-lint": "^1.13.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"c8": "^7.11.3",
"grunt": "1.5.3",
"grunt-contrib-nodeunit": "4.0.0",
"tcp-port-used": "1.0.2",
"webdriverio": "6.12.1"
"webdriverio": "7.20.2"
},
"peerDependencies": {
"grunt": ">=1.3.0"
Expand Down
Loading

0 comments on commit c9e0703

Please sign in to comment.