Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#561 replace travis with GitHub action #562

Merged
merged 8 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/html5sortable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Build and test
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm ci
- run: npm run github-build

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@


<h1> HTML5Sortable </h1>

[![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)
[![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)

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

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@types/jest": "^26.0.3",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"coveralls": "^3.1.0",
"eslint": "^7.4.0",
"jest": "^24.9.0",
"rollup": "^2.18.2",
Expand Down Expand Up @@ -69,6 +68,7 @@
}
},
"standard": {
"globals": ["HTMLElement", "configuration", "Event", "sortable", "offsetObject", "serializedItem", "Store"],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
Expand All @@ -81,8 +81,8 @@
"build": "rollup -c && cp $npm_package_main docs/html5sortable.js",
"release": "sh make-release.sh",
"standard": "standard 'src/*.ts' '__tests__/*.ts' | snazzy",
"travis": "npm run cover && npm run standard",
"cover": "jest --colors --coverage --coverageReporters=text-lcov | coveralls",
"github-build": "npm run cover && npm run standard",
"cover": "jest --coverage",
"postversion": "npm run release",
"tsc": "tsc ./src/*.ts --pretty --diagnostics --noEmit --watch"
}
Expand Down
2 changes: 2 additions & 0 deletions src/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-env browser */
/* eslint-disable no-use-before-define */
export const stores: Map<HTMLElement, Store> = new Map()
/* eslint-enable no-use-before-define */
/**
* Stores data & configurations per Sortable
* @param {Object} config
Expand Down