Skip to content

Commit 671acc3

Browse files
GontrumDavid Gontrum
andauthored
Replace travis with GitHub action. Closes #561
- replaced `.travis.yml` with a github-action - renamed travis script in `package.json` to `github-build` - updated to node version 14, because we used it in travis, too - added es-disable an export in `store.ts` to make standard green - added HTMLElement to global to make the standard green Co-authored-by: David Gontrum <david.gontrum@leanovate.de>
1 parent 06ff089 commit 671acc3

File tree

6 files changed

+40
-22
lines changed

6 files changed

+40
-22
lines changed

.coveralls.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Cache node modules
13+
uses: actions/cache@v2
14+
env:
15+
cache-name: cache-node-modules
16+
with:
17+
path: ~/.npm
18+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-build-${{ env.cache-name }}-
21+
${{ runner.os }}-build-
22+
${{ runner.os }}-
23+
24+
- name: Build and test
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: '14.x'
28+
- run: npm ci
29+
- run: npm run github-build
30+
31+
- name: Coveralls
32+
uses: coverallsapp/github-action@master
33+
with:
34+
github-token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66

77
<h1> HTML5Sortable </h1>
8-
9-
[![Build Status](https://img.shields.io/travis/lukasoppermann/html5sortable/master.svg?style=flat-square)](https://travis-ci.org/lukasoppermann/html5sortable) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) [![Coverage Status](https://img.shields.io/coveralls/lukasoppermann/html5sortable/master.svg?style=flat-square)](https://coveralls.io/github/lukasoppermann/html5sortable) [![Known Vulnerabilities](https://snyk.io/test/github/lukasoppermann/html5sortable/badge.svg?style=flat-square)](https://snyk.io/test/github/lukasoppermann/html5sortable) [![NPM](https://img.shields.io/npm/v/html5sortable.svg?style=flat-square)](https://www.npmjs.com/package/html5sortable) [![npm](https://img.shields.io/npm/dt/html5sortable.svg?style=flat-square)](https://www.npmjs.com/package/html5sortable) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](CONTRIBUTING.md) [![Code of Conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square)](CODE_OF_CONDUCT.md)
8+
[![Build Status](https://github.com/lukasoppermann/html5sortable/workflows/Build%20and%20test/badge.svg)](https://github.com/lukasoppermann/html5sortable/actions) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) [![Coverage Status](https://img.shields.io/coveralls/lukasoppermann/html5sortable/master.svg?style=flat-square)](https://coveralls.io/github/lukasoppermann/html5sortable) [![Known Vulnerabilities](https://snyk.io/test/github/lukasoppermann/html5sortable/badge.svg?style=flat-square)](https://snyk.io/test/github/lukasoppermann/html5sortable) [![NPM](https://img.shields.io/npm/v/html5sortable.svg?style=flat-square)](https://www.npmjs.com/package/html5sortable) [![npm](https://img.shields.io/npm/dt/html5sortable.svg?style=flat-square)](https://www.npmjs.com/package/html5sortable) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](CONTRIBUTING.md) [![Code of Conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square)](CODE_OF_CONDUCT.md)
109

1110
> **Lightweight vanillajs micro-library for creating sortable lists and grids using native HTML5 drag and drop API.**
1211

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"@types/jest": "^26.0.3",
3333
"@typescript-eslint/eslint-plugin": "^4.4.0",
3434
"@typescript-eslint/parser": "^4.4.0",
35-
"coveralls": "^3.1.0",
3635
"eslint": "^7.4.0",
3736
"jest": "^24.9.0",
3837
"rollup": "^2.18.2",
@@ -69,6 +68,7 @@
6968
}
7069
},
7170
"standard": {
71+
"globals": ["HTMLElement", "configuration", "Event", "sortable", "offsetObject", "serializedItem", "Store"],
7272
"parser": "@typescript-eslint/parser",
7373
"plugins": [
7474
"@typescript-eslint"
@@ -81,8 +81,8 @@
8181
"build": "rollup -c && cp $npm_package_main docs/html5sortable.js",
8282
"release": "sh make-release.sh",
8383
"standard": "standard 'src/*.ts' '__tests__/*.ts' | snazzy",
84-
"travis": "npm run cover && npm run standard",
85-
"cover": "jest --colors --coverage --coverageReporters=text-lcov | coveralls",
84+
"github-build": "npm run cover && npm run standard",
85+
"cover": "jest --coverage",
8686
"postversion": "npm run release",
8787
"tsc": "tsc ./src/*.ts --pretty --diagnostics --noEmit --watch"
8888
}

src/store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* eslint-env browser */
2+
/* eslint-disable no-use-before-define */
23
export const stores: Map<HTMLElement, Store> = new Map()
4+
/* eslint-enable no-use-before-define */
35
/**
46
* Stores data & configurations per Sortable
57
* @param {Object} config

0 commit comments

Comments
 (0)