From 9575616f3fae5199fb7407c5066416df9b4722f7 Mon Sep 17 00:00:00 2001 From: Rasmus <2124386+rasmusbe@users.noreply.github.com> Date: Thu, 19 Dec 2019 14:45:56 +0100 Subject: [PATCH] Add actions --- .circleci/config.yml | 56 ------------------------------------ .github/workflows/nodejs.yml | 31 ++++++++++++++++++++ readme.md | 2 +- 3 files changed, 32 insertions(+), 57 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/nodejs.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 51256a9..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: 2.1 - -commands: - test-nodejs: - steps: - - run: - name: Versions - command: npm version - - checkout - - restore_cache: - keys: - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }} - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-master-{{ .Environment.CIRCLE_JOB }} - - run: - name: Install dependencies - command: npm ci - - run: - name: Test - command: npm test - - save-npm-cache - save-npm-cache: - steps: - - save_cache: - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }} - paths: - - ~/.npm/_cacache - -jobs: - node-v8: - docker: - - image: node:8 - steps: - - test-nodejs - node-v10: - docker: - - image: node:10 - steps: - - test-nodejs - node-v12: - docker: - - image: node:12 - steps: - - test-nodejs - node-latest: - docker: - - image: node:latest - steps: - - test-nodejs - -workflows: - node-multi-build: - jobs: - - node-v8 - - node-v10 - - node-v12 - - node-latest diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..e658ff5 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,31 @@ +name: Node CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x, 13.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-${{ matrix.node-version }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.node-version }}-node- + - name: npm install and test + run: | + npm ci + npm test + env: + CI: true diff --git a/readme.md b/readme.md index 7f341c5..6ccb314 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ ## Information -[![npm version](https://badge.fury.io/js/gulp-wp-pot.svg)](https://www.npmjs.com/package/gulp-wp-pot) [![CircleCI](https://circleci.com/gh/wp-pot/gulp-wp-pot.svg?style=svg)](https://circleci.com/gh/wp-pot/gulp-wp-pot) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/wp-pot/gulp-wp-pot.svg)](https://greenkeeper.io/) +[![npm version](https://badge.fury.io/js/gulp-wp-pot.svg)](https://www.npmjs.com/package/gulp-wp-pot) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/wp-pot/gulp-wp-pot/Node%20CI/master)](https://github.com/wp-pot/gulp-wp-pot/actions) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wp-pot/gulp-wp-pot/?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/wp-pot/gulp-wp-pot.svg)](https://greenkeeper.io/) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwp-pot%2Fgulp-wp-pot.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwp-pot%2Fgulp-wp-pot?ref=badge_shield) | Package | gulp-wp-pot |