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
29 changes: 29 additions & 0 deletions .github/workflows/html5sortable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: 12.x
- run: npm ci
- run: npm run github-build
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"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",
"github-build": "npm run cover && npm run standard",
"cover": "jest --colors --coverage --coverageReporters=text-lcov | coveralls",
"postversion": "npm run release",
"tsc": "tsc ./src/*.ts --pretty --diagnostics --noEmit --watch"
Expand Down