Skip to content

Commit

Permalink
Merge pull request #17 from wictorwilen/preview
Browse files Browse the repository at this point in the history
Release 1.8.0
  • Loading branch information
wictorwilen authored Oct 22, 2021
2 parents d2ca03c + 5113319 commit 753199d
Show file tree
Hide file tree
Showing 25 changed files with 8,792 additions and 1,203 deletions.
51 changes: 51 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"settings": {

},
"env": {
"browser": false,
"es6": true,
"jest/globals": true
},
"extends": [
"standard",
"plugin:jest/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018
},
"plugins": [
"@typescript-eslint",
"jest"
],
"rules": {
"object-shorthand": 2,
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"space-before-function-paren": "off",
"space-in-parens": "off",
"padded-blocks": "off",
"no-unused-vars": "off"
}
}
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm run test
- uses: codecov/codecov-action@v2
with:
directory: ./coverage
flags: unittests
fail_ci_if_error: true
- run: npm run build
env:
CI: true
27 changes: 27 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- name: Publish release
if: "!contains(github.ref, 'preview')"
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish preview
if: contains(github.ref, 'preview')
run: npm publish --tag preview
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ node_modules/
dist
lib
.vscode
coverage
junit.xml
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ tsconfig.json
*.spec.js
.travis.yml
tslint.json
.eslintrc.json
jest.config.js
junit.xml
coverage
.github
test
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [*1.8.0*] - <*2021-10-22*>

### Added

* Unit testing
* Github code coverage integration

### Fixed

* Fixed in assue with CSP where the current host was not added correctly

### Changes

* **BREAKING**: Upgraded to `botbuilder` version `4.14.1` as minumum version
* Dependency bump
* Moved to Github actions
* Moved to ESLint

## [*1.7.0*] - <*2020-10-27*>

### Changes
Expand Down
26 changes: 26 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
roots: ["<rootDir>/src"],
transform: {
"^.+\\.tsx?$": "ts-jest"
},
preset: "ts-jest/presets/js-with-ts",
globals: {
"ts-jest": {
tsconfig: "<rootDir>/tsconfig.json",
diagnostics: {
ignoreCodes: []
}
}
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],

coverageDirectory: "coverage",
collectCoverageFrom: [
"/**/*.{js,jsx,ts,tsx}",
"!<rootDir>/node_modules/"
],
coverageReporters: [
"text", "html", "lcov"
]
};
Loading

0 comments on commit 753199d

Please sign in to comment.