From a06b4f50ddc85a42d109571429299f5d238c6cc4 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 11 Feb 2021 16:51:01 +0200 Subject: [PATCH 1/2] package.json: stop using `v.x.` --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9e43c11..d58ab38 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,13 @@ "homepage": "https://github.com/jakubpawlowicz/clean-css-cli#readme", "dependencies": { "clean-css": "^5.0.1", - "commander": "7.x", + "commander": "^7.0.0", "glob": "^7.1.6" }, "devDependencies": { - "http-proxy": "1.x", + "http-proxy": "^1.18.1", "jshint": "^2.12.0", - "source-map": "0.5.x", + "source-map": "^0.5.7", "vows": "^0.8.3" }, "engines": { From 833b5265e3479b451c840e6aa4f635193e011f86 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 11 Feb 2021 16:54:05 +0200 Subject: [PATCH 2/2] GitHub Actions: Add Windows tests too --- .github/workflows/node.js.yml | 29 ----------------------------- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 6 +++--- 3 files changed, 35 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/node.js.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index a6505c6..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: x86 Linux build - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - node-version: [10.x, 12.x, 14.x, 15.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..af43e5a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Tests + +on: [push, pull_request] + +env: + FORCE_COLOR: 2 + +jobs: + run: + name: Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node: [10, 12, 14, 15] + os: [ubuntu-latest, windows-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + + - name: Install npm dependencies + run: npm ci + + - name: Run tests + run: npm test diff --git a/README.md b/README.md index eddc030..eaaa32d 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,10 @@
-[![NPM version](https://img.shields.io/npm/v/clean-css-cli.svg?style=flat)](https://www.npmjs.com/package/clean-css-cli) -![x86 Linux build](https://github.com/jakubpawlowicz/clean-css-cli/workflows/x86%20Linux%20build/badge.svg) +[![npm version](https://img.shields.io/npm/v/clean-css-cli.svg?style=flat)](https://www.npmjs.com/package/clean-css-cli) +[![Build Status](https://img.shields.io/github/workflow/status/jakubpawlowicz/clean-css-cli/Tests/master)](https://github.com/jakubpawlowicz/clean-css-cli/actions?query=workflow%3ATests+branch%3Amaster) [![Dependency Status](https://img.shields.io/david/jakubpawlowicz/clean-css-cli.svg?style=flat)](https://david-dm.org/jakubpawlowicz/clean-css-cli) -[![NPM Downloads](https://img.shields.io/npm/dm/clean-css-cli.svg)](https://www.npmjs.com/package/clean-css-cli) +[![npm Downloads](https://img.shields.io/npm/dm/clean-css-cli.svg)](https://www.npmjs.com/package/clean-css-cli) clean-css-cli is a command-line interface to [clean-css](https://github.com/jakubpawlowicz/clean-css) - fast and efficient CSS optimizer for [Node.js](http://nodejs.org/).