Skip to content

Commit 1b5a490

Browse files
committed
cleanup code and add documentation.
1 parent 35da9d3 commit 1b5a490

File tree

31 files changed

+999
-139
lines changed

31 files changed

+999
-139
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Environment:**
26+
- OS: [e.g. Ubuntu 20.04]
27+
- Node.js version: [e.g. 16.14.0]
28+
- CryptoCore version: [e.g. 1.0.0]
29+
- Cryptocurrency: [e.g. Bitcoin, Ethereum]
30+
31+
**Configuration:**
32+
```javascript
33+
// Relevant configuration (remove sensitive data)
34+
```
35+
36+
**Logs:**
37+
```
38+
// Relevant log output
39+
```
40+
41+
**Additional context**
42+
Add any other context about the problem here.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Which cryptocurrency does this relate to?**
19+
- [ ] Bitcoin (BTC)
20+
- [ ] Ethereum (ETH)
21+
- [ ] Ripple (XRP)
22+
- [ ] Dash (DASH)
23+
- [ ] Dogecoin (DOGE)
24+
- [ ] Litecoin (LTC)
25+
- [ ] Other: [specify]
26+
- [ ] General/All currencies
27+
28+
**Additional context**
29+
Add any other context or screenshots about the feature request here.
30+
31+
**Implementation ideas**
32+
If you have ideas about how this could be implemented, please share them here.

.github/workflows/ci.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [14.x, 16.x, 18.x]
16+
17+
services:
18+
mongodb:
19+
image: mongo:5.0
20+
ports:
21+
- 27017:27017
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: 'npm'
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Run linting
36+
run: npm run lint
37+
38+
- name: Run tests
39+
run: npm test
40+
env:
41+
NODE_ENV: test
42+
MONGODB_URI: mongodb://localhost:27017/cryptocore_test
43+
44+
- name: Generate coverage report
45+
run: npm run test:coverage
46+
47+
- name: Upload coverage to Codecov
48+
uses: codecov/codecov-action@v3
49+
with:
50+
file: ./coverage/lcov.info
51+
flags: unittests
52+
name: codecov-umbrella
53+
54+
security:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v3
58+
59+
- name: Run security audit
60+
run: npm audit --audit-level=moderate
61+
62+
- name: Run Snyk to check for vulnerabilities
63+
uses: snyk/actions/node@master
64+
env:
65+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
66+
67+
docker:
68+
runs-on: ubuntu-latest
69+
needs: [test, security]
70+
if: github.ref == 'refs/heads/master'
71+
72+
steps:
73+
- uses: actions/checkout@v3
74+
75+
- name: Build Docker image
76+
run: docker build -t crypto-core:latest .
77+
78+
- name: Test Docker image
79+
run: |
80+
docker-compose -f docker-compose.test.yml up -d
81+
sleep 30
82+
docker-compose -f docker-compose.test.yml down

.gitignore

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,98 @@
1-
.idea
2-
yarn.lock
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
36
package-lock.json
4-
dev/docs/_site
5-
dev/docs/_documentation/5_currencies.md
6-
dev/docs/.sass-cache
7-
dev/docs/Gemfile.lock
7+
yarn.lock
8+
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
*.pid.lock
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage/
17+
*.lcov
18+
19+
# nyc test coverage
20+
.nyc_output
21+
22+
# Dependency directories
23+
jspm_packages/
24+
25+
# Optional npm cache directory
26+
.npm
27+
28+
# Optional REPL history
29+
.node_repl_history
30+
31+
# Output of 'npm pack'
32+
*.tgz
33+
34+
# Yarn Integrity file
35+
.yarn-integrity
36+
37+
# Environment variables
38+
.env
39+
.env.local
40+
.env.development.local
41+
.env.test.local
42+
.env.production.local
43+
44+
# Logs
45+
logs/
46+
*.log
47+
48+
# IDE files
49+
.idea/
50+
.vscode/
51+
*.swp
52+
*.swo
53+
*~
54+
55+
# OS files
56+
.DS_Store
57+
.DS_Store?
58+
._*
59+
.Spotlight-V100
60+
.Trashes
61+
ehthumbs.db
62+
Thumbs.db
63+
64+
# Configuration files with secrets
865
configs/secrets.js
9-
dev/docs/tests
66+
configs/production.js
67+
configs/staging.js
68+
configs/*.local.js
69+
70+
# Database files
71+
*.db
72+
*.sqlite
73+
74+
# Documentation build
75+
dev/docs/_site/
76+
dev/docs/.sass-cache/
77+
dev/docs/Gemfile.lock
78+
dev/docs/tests/
79+
docs/api/
80+
81+
# Docker volumes
82+
docker-data/
83+
84+
# Temporary files
85+
tmp/
86+
temp/
87+
88+
# Build artifacts
89+
dist/
90+
build/
91+
92+
# Private keys and certificates
93+
*.pem
94+
*.key
95+
*.crt
96+
*.p12
97+
keys/
98+
certs/

.gitlab-ci.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.tikle.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)