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

chore: add github actions ci #350

Merged
merged 1 commit into from
Oct 18, 2021
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Github actions workflow name
name: CI

# Triggers the workflow on push or pull request events
on:
push:
branches: [main, master]
tags: ['**']
pull_request:
branches:
- master

jobs:
node_tests:
name: 'Test nib on ${{matrix.os}} with node${{matrix.node}}'
strategy:
matrix:
os: [ubuntu-latest]
# Latest four Nodejs LTS version
node: [10, 12, 14, 16]
runs-on: ${{ matrix.os }}
steps:
# Pull repo to test machine
- uses: actions/checkout@v2
# Configures the node version used on GitHub-hosted runners
- uses: actions/setup-node@v2
with:
# The Node.js version to configure
node-version: ${{ matrix.node }}
# Caching dependencies to speed up workflows
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
# Output useful info for debugging.
run: node --version && npm --version
- name: Run Test
run: npm test
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

6 changes: 2 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[![Build Status](https://travis-ci.org/stylus/nib.svg?branch=master)](https://travis-ci.org/stylus/nib)
# Nib [![npm](https://img.shields.io/npm/v/nib)](https://www.npmjs.com/package/nib) [![build status](https://github.com/stylus/nib/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stylus/nib/actions/workflows/ci.yml)

# Nib

Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://stylus.github.io/nib/).
Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://stylus.github.io/nib).

## Installation

Expand Down
107 changes: 52 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/nib.git"
"url": "git://github.com/stylus/nib.git"
},
"dependencies": {
"stylus": "^0.54.8"
"peerDependencies": {
"stylus": "*"
},
"devDependencies": {
"stylus": ">= 0.55.0",
"connect": "1.x",
"jade": "0.22.0",
"mocha": "*",
Expand All @@ -22,7 +23,7 @@
"node": "*"
},
"scripts": {
"test": "mocha",
"test": "mocha test/runner.js",
"test-server": "node test/server.js"
}
}