Skip to content

Commit

Permalink
Merge pull request #5 from jalal246/dev
Browse files Browse the repository at this point in the history
Add workflow
  • Loading branch information
jalal246 authored Dec 12, 2020
2 parents 113ea2a + 5b9e88e commit 8f6646f
Show file tree
Hide file tree
Showing 9 changed files with 2,085 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
},
extends: ["airbnb-base", "prettier"],
parserOptions: {
ecmaVersion: 12,
},
globals: {
describe: true,
it: true,
expect: true,
},
rules: {},
};
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
day: "sunday"


- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
60 changes: 60 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 30

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- feature

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: wontfix

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.

# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.

# Limit the number of actions per hour, from 1-30. Default is 30
# limitPerRun: 30
# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.

# issues:
# exemptLabels:
# - confirmed
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
push:
branches:
- master
pull_request:

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x

- name: Cache Dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: yarn

- name: Run lint
run: yarn eslint .
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Unit Test

on:
push:
branches:
- master
pull_request:

jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x

- name: Cache Dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: yarn

- name: Run Test
run: CI=true yarn mocha
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
*.log
*.lock
.changelog
build
dist
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
"@babel/core": "^7.8.4",
"@babel/register": "^7.8.3",
"chai": "^4.2.0",
"mocha": "^8.0.1"
"eslint": "^7.15.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-import": "^2.22.1",
"mocha": "^8.2.1"
}
}
Loading

0 comments on commit 8f6646f

Please sign in to comment.