From 3c1314ac805d21af50ccbc63185687aaa6418f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20N=C3=B6lke?= Date: Wed, 22 Apr 2020 14:19:55 +0200 Subject: [PATCH] chore(ci): replace Travis CI with GitHub actions (#240) Remove Travis configuration and create a GitHub actions workflow for continuous integration. --- .github/workflows/integration.yml | 36 +++++++++++++++++++++++++++++++ .travis.yml | 18 ---------------- README.md | 15 ++++++++----- 3 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/integration.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..0589ab4a --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,36 @@ +# 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: Continuous Integration + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x] + + name: Build and Test + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install + run: npm ci + - name: Test + run: npm test + env: + CI: true + - name: Collect test coverage + run: npm run test:coverage + env: + CI: true + - name: Upload test coverage + uses: codecov/codecov-action@v1.0.6 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7b104b4e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -node_js: - - '10' - - '12' - -before_install: - - npm install codecov -g - -after_success: - - npm run test:coverage | codecov - -deploy: - provider: npm - email: '$NPM_EMAIL' - api_key: '$NPM_TOKEN' - on: - tags: true - skip_cleanup: true diff --git a/README.md b/README.md index 4887b990..8f8cfcfe 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -# simple-odf +# simple-odf simple-odf is a library for creating Open Document Format text files using Typescript/JavaScript and Node.js. [![Build Status](https://travis-ci.com/connium/simple-odf.svg?branch=master)](https://travis-ci.com/connium/simple-odf) +![](https://github.com/actions/connium/simple-odf/Continuous%20Integration/badge.svg) [![Version](https://img.shields.io/npm/v/simple-odf.svg)](https://www.npmjs.com/package/simple-odf) [![codecov](https://codecov.io/gh/connium/simple-odf/branch/master/graph/badge.svg)](https://codecov.io/gh/connium/simple-odf) [![Dependencies](https://david-dm.org/connium/simple-odf.svg)](https://david-dm.org/connium/simple-odf) @@ -64,10 +65,12 @@ style1.setPageBreak(simpleOdf.PageBreak.Before); style1.setKeepTogether(); p1.setStyle(style1); // font usage -document.getFontFaceDeclarations().create('Open Sans', 'Open Sans', simpleOdf.FontPitch.Variable); +document + .getFontFaceDeclarations() + .create('Open Sans', 'Open Sans', simpleOdf.FontPitch.Variable); const style2 = new simpleOdf.ParagraphStyle(); style2.setFontName('Open Sans'); -const p2 = body.addParagraph('It always seems impossible until it\'s done.'); +const p2 = body.addParagraph("It always seems impossible until it's done."); p2.setStyle(style2); body.addHeading('Credits', 2); @@ -76,7 +79,9 @@ body.addParagraph('This was quite easy. Do you want to know why?'); const list = body.addList(); list.addItem().addParagraph('one-liner setup'); -list.addItem().addParagraph('just write like you would do in a full-blown editor'); +list + .addItem() + .addParagraph('just write like you would do in a full-blown editor'); document.saveFlat('/home/homer/My_first_document.fodf'); ``` @@ -100,7 +105,7 @@ Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of cond ### Pull Requests -*Before* submitting a pull request, please make sure the following is done... +_Before_ submitting a pull request, please make sure the following is done... 1. Fork the repo and create your branch from `master`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/