Skip to content

Commit

Permalink
Merge pull request #1 from vahidalizad/alpha
Browse files Browse the repository at this point in the history
Alpha
  • Loading branch information
alino20 authored Aug 28, 2024
2 parents 6855973 + 590a591 commit fd5c187
Show file tree
Hide file tree
Showing 42 changed files with 8,592 additions and 1,726 deletions.
9 changes: 7 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"presets": ["@babel/preset-env"],
"presets": ["@babel/preset-env", "@babel/preset-typescript"],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-transform-modules-commonjs",
[
"module-resolver",
{
"extensions": [".js", ".ts", ".json"],
"root": ["./src"],
"alias": {
"@Functions": "./src/functions",
"@Constants": "./src/constants"
"@Constants": "./src/constants",
"@Types": "./src/types",
"@test": "./test"
}
}
]
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- run: npm ci
env:
CI: true
- uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage

deploy:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Create GitHub Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: false
# prerelease: false
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
workflow_dispatch:
branches:
- alpha

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- run: npm ci
env:
CI: true
- uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.npmrc
logs/
dist/
node_modules/
coverage/
.nyc_output/
.env
29 changes: 29 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';

// This is a JavaScript-based config file containing every Mocha option plus others.
// If you need conditional logic, you might want to use this type of config,
// e.g. set options via environment variables 'process.env'.
// Otherwise, JSON or YAML is recommended.

module.exports = {
diff: true,
extension: ['js', 'cjs', 'mjs'],
package: './package.json',
reporter: 'spec',
slow: '75',
timeout: '2000',
require: [
'@babel/register',
'ts-node/register',
// 'mocha-suppress-logs',
'test/hooks.js',
],
globals: ['Parse'],
extensions: ['ts', 'js'],
exit: true,
// delay: true,
'check-leaks': true,
sort: true,
spec: 'test/**/*.spec.js',
// 'watch-files': ['test/**/*.spec.js'],
};
11 changes: 8 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.github/
.vscode/
src/
.npmrc
test/
logs/
coverage/
.nyc_output/
eslint.config.js
.nycrc
.babelrc
.eslintrc.js
.mocharc.js
.gitignore
.gitlab-ci.yml
.prettierrc
14 changes: 14 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"reporter": ["text", "lcov"],
"exclude": [
"coverage/**",
"test/**",
"dist/**",
"node_modules/**",
"**/*.d.ts"
],
"extension": [".js", ".ts"],
"require": ["@babel/register"],
"sourceMap": true,
"instrument": true
}
13 changes: 0 additions & 13 deletions .vscode/launch.json

This file was deleted.

Loading

0 comments on commit fd5c187

Please sign in to comment.