Migrate to github actions (#378)

* Migrate to github actions

* Remove `ci`. Forgot I removed the lockfile.

* Use `compile` instead of `build` so that tests aren't run twice

* Update build badge
pull/377/head
Glen Cheney 2 years ago committed by GitHub
parent 30e5e3ac11
commit 05dd46dc92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,25 @@
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Lint files
run: npm run lint
- name: Build bundle
run: npm run compile
- name: Run unit tests
run: npm test

@ -1,4 +0,0 @@
language: node_js
node_js:
- '12'
- '14'

@ -1,4 +1,4 @@
# [Shuffle][homepage] [![Build Status][travis-img]][travis-url] [![Dependency Status][david-img]][david-url] [![Dependabot Status][dependabot-img]][dependabot-url] [![NPM version][npm-img]][npm-url]
# [Shuffle][homepage] ![Build Status][actions-img] [![Dependabot Status][dependabot-img]][dependabot-url] [![NPM version][npm-img]][npm-url]
Categorize, sort, and filter a responsive grid of items.
@ -26,10 +26,7 @@ const shuffleInstance = new Shuffle(document.getElementById('grid'), {
This project was inspired by [Isotope](http://isotope.metafizzy.co/) and [Packery](http://packery.metafizzy.co/).
[homepage]: https://vestride.github.io/Shuffle/
[travis-url]: https://travis-ci.com/Vestride/Shuffle
[travis-img]: https://travis-ci.com/Vestride/Shuffle.svg?branch=main
[david-url]: https://david-dm.org/Vestride/Shuffle
[david-img]: https://david-dm.org/Vestride/Shuffle.svg
[actions-img]: https://github.com/Vestride/Shuffle/actions/workflows/build.yml/badge.svg?branch=main
[npm-url]: https://www.npmjs.com/package/shufflejs
[npm-img]: https://img.shields.io/npm/v/shufflejs.svg
[dependabot-url]: https://docs.github.com/en/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates

@ -24,7 +24,10 @@
"gulp": "gulp",
"build": "npm run gulp && npm run css",
"serve": "gulp jekyll",
"test": "eslint src && jest && tsc --project ./test/types",
"test-all": "npm run lint && npm test && npm run type-check",
"test": "jest",
"lint": "eslint src",
"type-check": "tsc --project ./test/types",
"watch": "gulp watch"
},
"repository": {

Loading…
Cancel
Save