Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pustovitDmytro/npm-boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Jan 22, 2022
2 parents 5f07d73 + e2dec02 commit 9945fe2
Show file tree
Hide file tree
Showing 9 changed files with 521 additions and 1,792 deletions.
42 changes: 1 addition & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ cache-defaults: &cache-defaults
- -{{ checksum "package-lock.json" }}

parameters:
skip-fossa:
type: boolean
default: false
skip-coveralls:
type: boolean
default: false
Expand All @@ -29,16 +26,6 @@ aliases:
command: |
echo 'export DANGER_GITHUB_API_TOKEN=$(echo Z2hwXzFldFVxODNZTUhCa0ZQUjk0WVV1blFXZTFCVmkzajRSOEpxRQo= | base64 --decode)' >> $BASH_ENV
source $BASH_ENV
- &fossa-install
name: Install fossa
command: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
- &fossa-analize
name: Send package to fossa
command: fossa analyze
- &fossa-test
name: Check fossa results
command: fossa test
- &danger-pr
name: Run danger
command: npx danger ci -d .dangerfile.js
Expand Down Expand Up @@ -87,20 +74,10 @@ jobs:
install:
<<: *defaults
steps:
- when:
condition:
not: << pipeline.parameters.skip-fossa >>
steps:
- run: *fossa-install
- checkout
- run: *install
- run: *security
- run: *danger-pr
- when:
condition:
not: << pipeline.parameters.skip-fossa >>
steps:
- run: *fossa-analize
- save_cache: *cache-modules
test-security:
<<: *defaults
Expand Down Expand Up @@ -130,18 +107,6 @@ jobs:
not: << pipeline.parameters.skip-coveralls >>
steps:
- run: *coveralls
test-fossa:
<<: *defaults
steps:
- checkout
- when:
condition:
not: << pipeline.parameters.skip-fossa >>
steps:
- run: *fossa-install
- restore_cache:
<<: *cache-defaults
- run: *fossa-test
test-lint:
<<: *defaults
steps:
Expand All @@ -154,7 +119,7 @@ jobs:
test-leaks:
resource_class: small
docker:
- image: zricethezav/gitleaks
- image: zricethezav/gitleaks:v7.6.1
steps:
- checkout
- when:
Expand Down Expand Up @@ -218,11 +183,6 @@ workflows:
- test-leaks:
requires:
- install
- test-fossa:
context: branches
requires:
- install
- test-package
- deploy:
context: npm-packages
requires:
Expand Down
13 changes: 13 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
container:
image: docker/fossa-analyzer

environment:
FOSSA_API_KEY: ENCRYPTED[!2c50354cec1793abe3c6b555b8121330149b461ee4e8d5ef810d467652b74352e5924ab613eea3ac002a3898c6c5a1ef!]

analyze_task:
script: fossa analyze

test_task:
depends_on:
- analyze
script: fossa test
47 changes: 47 additions & 0 deletions .github/workflows/npt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Node.js versions

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: npm ci
- name: Pack tests
run: npx npt pack -c .package-tester.json
- uses: actions/upload-artifact@master
with:
name: package-tests
path: tmp
test:
runs-on: ${{ matrix.os }}
env:
YARGS_MIN_NODE_VERSION: ${{ matrix.node }}
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
node: [ 10, 12, 14, 16 ]
needs: build
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Show configuration
run: |
npm config get user-agent
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: package-tests
path: tmp
- name: Install dependencies
working-directory: tmp/package-tests
run: npm install
- name: Run tests
working-directory: tmp/package-tests
run: npm run test
7 changes: 6 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
],
[
"semantic-release-telegram", {
"chats": [ 238585617 ]
"chats": [ 238585617 ],
"telegra.ph" : {
"title" : "{name} v.{version}",
"message" : "<a href='{telegraph_url}'>Release Notes</a>",
"content" : "{release_notes}"
}
}
]
],
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Dmytro Pustovit
Copyright (c) 2021-2022 Dmytro Pustovit

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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Base API client backed by [axios](https://www.npmjs.com/package/axios).
- [Contribute](#contribute)

## Requirements
[![Platform Status][appveyor-badge]][appveyor-url]
[![Platform Status][node-ver-test-badge]][node-ver-test-url]

To use library you need to have [node](https://nodejs.org) and [npm](https://www.npmjs.com) installed in your machine:

* node `>=10`
* npm `>=6`

Package is [continuously tested][appveyor-url] on darwin, linux, win32 platforms. All active and maintenance [LTS](https://nodejs.org/en/about/releases/) node releases are supported.
Package is [continuously tested][node-ver-test-url] on darwin, linux and win32 platforms. All active and maintenance [LTS](https://nodejs.org/en/about/releases/) node releases are supported.

## Installation

Expand Down Expand Up @@ -226,8 +226,8 @@ Make the changes to the code and tests. Then commit to your branch. Be sure to f
[npm-size-badge]: https://img.shields.io/bundlephobia/min/base-api-client
[npm-size-url]: https://bundlephobia.com/result?p=base-api-client

[appveyor-badge]: https://ci.appveyor.com/api/projects/status/dy3ym8db8yfn7pj7/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/pustovitDmytro/base-api-client/branch/master
[node-ver-test-badge]: https://github.com/pustovitDmytro/base-api-client/actions/workflows/npt.yml/badge.svg?branch=master
[node-ver-test-url]: https://github.com/pustovitDmytro/base-api-client/actions?query=workflow%3A%22Node.js+versions%22

[fossa-badge]: https://app.fossa.com/api/projects/custom%2B24828%2Fbase-api-client.svg?type=shield
[fossa-url]: https://app.fossa.com/projects/custom%2B24828%2Fbase-api-client?ref=badge_shield
[fossa-url]: https://app.fossa.com/projects/custom%2B24828%2Fbase-api-client?ref=badge_shield
146 changes: 0 additions & 146 deletions appveyor.yml

This file was deleted.

0 comments on commit 9945fe2

Please sign in to comment.