Skip to content

Commit

Permalink
ci(actions): run tests with coverage in linux/windows vms
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Apr 27, 2022
1 parent d5f3d70 commit 86dfe1a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CD Utils
name: CD

on:
push:
Expand All @@ -7,30 +7,24 @@ on:

jobs:
build:

runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'

- name: Download dependencies
- name: Install dependencies
run: npm install

- name: Transpile typescript to javascript
run: npm run build

- name: Automatic GitHub Release
uses: justincy/github-action-npm-release@2.0.1
id: release

- name: Publish to NPM Registry
run: npm publish --access public
if: steps.release.outputs.released == 'true'
Expand Down
52 changes: 35 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,49 @@
name: CI Utils
name: CI

on:
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-18.04

linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.15.4
- 17.x
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
node-version: ${{ matrix.node-version }}

- name: Download dependencies
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test:coverage

windows:
runs-on: windows-latest
strategy:
matrix:
node-version:
- 14.15.4
- 17.x
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Verify project lint and try to fix it
run: npm run lint:fix

- name: Run the tests from project
run: npm run test
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test:coverage
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
Coverage
*.lcov

# nyc test coverage
Expand Down Expand Up @@ -124,4 +125,3 @@ out

# MacOS folder mapper file
.DS_Store
.Coverage
39 changes: 12 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,32 @@

SecJS is a community driven project. You are free to contribute in any of the following ways.

- [Coding style](coding-style)
- [Fix bugs by creating PR's](fix-bugs-by-creating-prs)
- [Share an RFC for new features or big changes](share-an-rfc-for-new-features-or-big-changes)
- [Report security issues](report-security-issues)
- [Be a part of the community](be-a-part-of-community)
- [Coding style](#coding-style)
- [Fix bugs by creating PR's](#fix-bugs-by-creating-prs)
- [Report security issues](#report-security-issues)

## Coding style

Majority of SecJS core packages are written in Typescript. Having a brief knowledge of Typescript is required to contribute to the core.
Majority of SecJS core packages are written in Typescript. Having a brief knowledge of Typescript is required to
contribute to the core.

## Fix bugs by creating PR's

We appreciate every time you report a bug in the packages. However, taking time to submit a PR can help us in fixing bugs quickly and ensure a healthy and stable eco-system.
We appreciate every time you report a bug in the packages. However, taking time to submit a PR can help us in fixing
bugs quickly and ensure a healthy and stable ecosystem.

Go through the following points, before creating a new PR.

1. Create an issue discussing the bug or short-coming in the package.
2. Once approved, go ahead and fork the repository.
3. Make sure to start from the `develop`, since this is the upto date branch.
4. Make sure to keep commits small and relevant.
5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our commit messages. Instead of running `git commit -m "message"`, you must run only `git commit`, which will show you prompts to create a valid commit message.
5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our
commit messages. Instead of running `git commit -m "message"`, you must run only `git commit`, which will show you
prompts to create a valid commit message.
6. Once done with all the changes, create a PR against the `develop` branch.

## Share an RFC for new features or big changes

Sharing PR's for small changes works great. However, when contributing big features to the package, it is required to go through the RFC process.

### What is an RFC?

RFC stands for **Request for Commits**, a standard process followed by many other frameworks including [Ember](https://github.com/emberjs/rfcs), [yarn](https://github.com/yarnpkg/rfcs) and [rust](https://github.com/rust-lang/rfcs).

In brief, RFC process allows you to talk about the changes with everyone in the community and get a view of the core team before dedicating your time to work on the feature.

The RFC proposals are created as issues on [SecJS/Rfcs](https://github.com/SecJS/Rfcs) repository. Make sure to read the README to learn about the process in depth.

## Report security issues

All the security issues, must be reported via [email](mailto:lenon@secjs.com.br) and not using any of the public channels.

## Be a part of community

We welcome you to participate in the [forum](https://forum.secjs.com.br/) and the SecJS [discord server](https://discord.me/secjs). You are free to ask your questions and share your work or contributions made to SecJS eco-system.

We follow a strict [Code of Conduct](https://secjs.com.br/community-guidelines) to make sure everyone is respectful to each other.
All the security issues, must be reported via [email](mailto:lenonSec7@gmail.com) and not using any of the public
channels.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ export * from '#src/Exceptions/NotFoundFolderException'
export * from '#src/Exceptions/OrdinalNanException'
export * from '#src/Exceptions/RecursiveConfigException'
export * from '#src/Exceptions/RouteMatchException'

// TODO Update docs
// TODO Create .d.ts files

0 comments on commit 86dfe1a

Please sign in to comment.