Skip to content

Commit aad9cc6

Browse files
authored
Merge pull request #10 from jhomarolo/main
build(dependencies): update devdependencies and git actions dependencies
2 parents 2d8b493 + 693cf9a commit aad9cc6

9 files changed

+11959
-939
lines changed

.eslintrc.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"Atomics": "readonly",
1111
"SharedArrayBuffer": "readonly"
1212
},
13-
"parser": "babel-eslint",
13+
"parser": "@babel/eslint-parser",
1414
"parserOptions": {
15-
"ecmaVersion": 2018
15+
"ecmaVersion": 2018,
16+
"requireConfigFile": false
1617
},
1718
"rules": {
1819
"semi": ["error", "never"],

.github/CONTRIBUTING.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Contributing
2+
3+
:wave: Hi there!
4+
We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
5+
6+
## Submitting a pull request
7+
8+
[Pull Requests][pulls] are used for adding new playbooks, roles, and documents to the repository, or editing the existing ones.
9+
10+
**With write access**
11+
12+
1. Clone the repository (only if you have write access)
13+
1. Create a new branch: `git checkout -b my-branch-name`
14+
1. Make your change
15+
1. Push and [submit a pull request][pr]
16+
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
17+
18+
**Without write access**
19+
20+
1. [Fork][fork] and clone the repository
21+
1. Create a new branch: `git checkout -b my-branch-name`
22+
1. Make your change
23+
1. Push to your fork and [submit a pull request][pr]
24+
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
25+
26+
**Commit Structure**
27+
All the Herbs organization libraries uses seemantic release and commitizen to :
28+
29+
- Generate changelog
30+
- Control version
31+
- Publish to npm via github actions
32+
Please use this format for commit messages (https://semver.org/).
33+
34+
To help with this task we have implemented the commitizen to all libraries, just follow those steps:
35+
36+
- `npm install -g commitizen`
37+
- Write a lot of good code to contribute to herbs 🌿
38+
- `git add yourChanges`
39+
- `git cz` or `npm run commit` or `npx cz` instead `git commit`
40+
- `git push`
41+
42+
43+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
44+
45+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
46+
- Write [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
47+
48+
Draft pull requests are also welcome to get feedback early on, or if there is something blocking you.
49+
50+
- Create a branch with a name that identifies the user and nature of the changes (similar to `user/branch-purpose`)
51+
- Open a pull request
52+
53+
54+
## Resources
55+
56+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
57+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
58+
- [GitHub Help](https://help.github.com)
59+
60+
[pulls]: https://github.com/herbsjs/herbs2mongo/pulls
61+
[pr]: https://github.com/herbsjs/herbs2mongo/compare
62+
[fork]: https://github.com/herbsjs/herbs2mongo/fork

.github/workflows/cd.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CD Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
if: "!contains(github.event.head_commit.message, 'skip ci')"
10+
runs-on: ubuntu-18.04
11+
12+
strategy:
13+
matrix:
14+
node-version: [14.x]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- name: Install Packages
24+
run: npm ci
25+
26+
- name: Installing dependencies
27+
run: npm i --ignore-scripts
28+
29+
- name: Build Step
30+
env:
31+
CI: ""
32+
run: npm run build --if-present
33+
34+
- name: Running Linter - ESLint
35+
run: npm run lint
36+
37+
- name: Run Semantic Release
38+
run: npx semantic-release
39+
env:
40+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/ci.yml

+27-32
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: CI
1+
name: CI build
52

63
on:
7-
push:
8-
branches: [ main ]
4+
pull_request:
5+
branches: [main]
96

107
jobs:
118
build:
12-
if: "!contains(github.event.head_commit.message, 'skip ci')"
13-
runs-on: ubuntu-18.04
14-
steps:
15-
- uses: actions/checkout@v2
16-
17-
- name: Use Node.js (12.16.2)
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: '12.16.2'
9+
runs-on: ubuntu-latest
2110

22-
- name: Install Packages
23-
run: npm ci
11+
strategy:
12+
matrix:
13+
node-version: [14.x]
2414

25-
- name: Installing dependencies
26-
run: npm i --ignore-scripts
27-
28-
- name: Build Step
29-
env:
30-
CI: ""
31-
run: npm run build --if-present
32-
33-
- name: Running Linter - ESLint
34-
run: npm run lint
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
22+
- name: Installing dependencies
23+
run: npm i --ignore-scripts
24+
- name: Running tests
25+
run: |
26+
npm test
27+
npx nyc --reporter=lcov npm test && npx codecov
28+
env:
29+
CI: true
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v2
32+
33+
- name: Running Linter - ESLint
34+
run: npm run lint
3535

36-
- name: Run Semantic Release
37-
run: npx semantic-release
38-
env:
39-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
40-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/on_pull_request.yml

-32
This file was deleted.

.github/workflows/on_push.yml

-28
This file was deleted.

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,9 @@ Tests:
337337
- [X] Pure JS
338338
- [X] MongoDB
339339
340+
### Contribute
341+
Come with us to make an awesome *herbs2mongo*.
342+
343+
Now, if you do not have the technical knowledge and also have intended to help us, do not feel shy, [click here](https://github.com/herbsjs/herbs2mongo/issues) to open an issue and collaborate their ideas, the contribution may be a criticism or a compliment (why not?)
344+
345+
If you would like to help contribute to this repository, please see [CONTRIBUTING](https://github.com/herbsjs/herbs2mongo/blob/main/.github/CONTRIBUTING.md)

0 commit comments

Comments
 (0)