Skip to content

Commit

Permalink
fix(ci): adopt semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinecula authored and nomego committed Oct 9, 2019
1 parent b29dc38 commit 3ae483f
Show file tree
Hide file tree
Showing 9 changed files with 23,052 additions and 20,895 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Github CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: Install
run: npm ci

- name: Lint commit messages
run: npx commitlint --from origin/master --to HEAD

- name: ESLint
run: npx github-actions-eslint-annotator
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test and report
env:
CC_TEST_REPORTER_ID: 1aa3076670ef336a22534f197dd55f553b5c6a14883f53dfe64f938651031115
GIT_BRANCH: ${{ github.ref }}
GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
NEO_CC_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
NEO_CC: ./cc-test-reporter
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: |
([[ -e $NEO_CC ]] || curl -L $NEO_CC_URL > $NEO_CC) && chmod +x $NEO_CC
$NEO_CC before-build
npm run test $([ -z "$SAUCE_ACCESS_KEY"] && echo "-- --skip-plugin sauce")
$NEO_CC after-build --exit-code $?
- name: Semantic release
run: npx semantic-release
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
NullXlsx
========

[![Build Status](https://travis-ci.org/Neovici/nullxlsx.svg?branch=master)](https://travis-ci.org/Neovici/nullxlsx)
[![Build Status](https://github.com/Neovici/nullxlsx/workflows/Github%20CI/badge.svg)](https://github.com/Neovici/nullxlsx/actions?workflow=Github+CI)
[![Maintainability](https://api.codeclimate.com/v1/badges/64979759c180a78e9a77/maintainability)](https://codeclimate.com/github/Neovici/nullxlsx/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/64979759c180a78e9a77/test_coverage)](https://codeclimate.com/github/Neovici/nullxlsx/test_coverage)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-red.svg)](https://www.webcomponents.org/element/Neovici/nullxlsx)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Minimal JavaScript library to create XLSX spreadsheet and ZIP archive files.

Expand All @@ -14,8 +15,8 @@ No dependencies, focused on library size only. Weights 10k minimized, 3k zipped.

```javascript
// Data should be array of arrays
var data = [['Title 1', 'Title 2'],
['Carl', 12.4, new Date(2017, 7 - 1, 10)],
var data = [['Title 1', 'Title 2'],
['Carl', 12.4, new Date(2017, 7 - 1, 10)],
['Mia', 678, new Date()]
];

Expand All @@ -28,7 +29,7 @@ document.body.appendChild(xlsx.createDownloadLink('Download test.xlsx'));
```

### Distributables
The "dist" directory has three files:
The "dist" directory has three files:

File | Size (gz) | Description
--- | --- | ---
Expand Down
3 changes: 2 additions & 1 deletion demo/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"no-throw-literal": "off",
"max-lines-per-function": "off",
"max-statements": "off",
"no-bitwise": "off"
"no-bitwise": "off",
"no-console": "off"
}
}
12 changes: 5 additions & 7 deletions demo/readzip.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ <h3>Analysis of generated zip</h3>
import {NullZipArchive} from '../';


const trace = console.log;

const maxDataToShow = 16;
const trace = console.log,
maxDataToShow = 16;

// show buffer as hex, cut off if too long
function u8a2hex(u8arr, maxLength = u8arr.length) {
Expand All @@ -38,10 +37,9 @@ <h3>Analysis of generated zip</h3>
}

function handleFileSelect(evt) {
const files = evt.target.files; // FileList object

// files is a FileList of File objects. List some properties.
const output = [];
const files = evt.target.files, // FileList object
// files is a FileList of File objects. List some properties.
output = [];
for (let i = 0, f; files[i]; i++) {
f = files[i];
output.push('<li><strong>', escape(f.name), '</strong> (', f.type || 'n/a', ') - ',
Expand Down
Loading

0 comments on commit 3ae483f

Please sign in to comment.