Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: update project tooling #376

Merged
merged 12 commits into from
Jul 29, 2020
24 changes: 24 additions & 0 deletions .github/workflows/continuous-deployment-workflow.yml
@@ -0,0 +1,24 @@
name: CD
on:
release:
types: [created]
jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
registry-url: https://registry.npmjs.org
- run: npm ci --ignore-scripts
- run: npm run prettier:check
- run: npm run lint:check
- run: npm run test:ci
- run: npm run build
- run: cp LICENSE build/LICENSE
- run: cp README.md build/README.md
- run: cp package.json build/package.json
- run: npm publish ./build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
@@ -0,0 +1,35 @@
name: CI
on: push
jobs:
checks:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: npm ci --ignore-scripts
- run: npm run prettier:check
- run: npm run lint:check
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v1
- name: Setting up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- run: npm ci --ignore-scripts
- run: npm run test:ci
- run: npm install codecov -g
- run: codecov -f ./coverage/clover.xml -t ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
needs: [tests, checks]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: npm ci --ignore-scripts
- run: npm run build
23 changes: 0 additions & 23 deletions .github/workflows/nodejs.yml

This file was deleted.

56 changes: 51 additions & 5 deletions .gitignore
@@ -1,6 +1,52 @@
build/
node_modules/
coverage/
npm-debug.log
# Log files
logs
*.log
*.tmp
*.tmp.*
log.txt
npm-debug.log*

# Testing output
lib-cov/**
coverage/**

# Environment files
.env

# Dependency directories
node_modules

# MacOS related files
*.DS_Store
.AppleDouble
.LSOverride
._*
UserInterfaceState.xcuserstate

# Windows related files
Thumbs.db
Desktop.ini
$RECYCLE.BIN/

# IDE - Sublime
*.sublime-project
*.sublime-workspace

# IDE - VSCode
.vscode/**
!.vscode/tasks.json
!.vscode/launch.json

# IDE - IntelliJ
.idea
.vscode

# Compilation output folders
dist/
build/
tmp/
out-tsc/
temp

# Files for playing around locally
playground.ts
playground.js
8 changes: 8 additions & 0 deletions .prettierrc.yml
@@ -0,0 +1,8 @@
printWidth: 120
tabWidth: 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting will create a big diff on the next PR, because most of the tabulations on the code is defined as 4 spaces. Should we change it now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know. I did not run prettier for this reason. We should clean up the PRs and only autoformat after.

useTabs: false
semi: true
singleQuote: true
trailingComma: es5
bracketSpacing: true
arrowParens: avoid
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2015-2016 Umed Khudoiberdiev
Copyright (c) 2015-2020 Umed Khudoiberdiev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down