Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
clr-li committed Jan 6, 2024
2 parents 41e12da + 6ee86f0 commit 0749c22
Show file tree
Hide file tree
Showing 102 changed files with 17,247 additions and 3,483 deletions.
17 changes: 17 additions & 0 deletions .badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .badges/file-count.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .badges/lines-of-code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100

[{*.js,*.json,*.yml}]
indent_size = 4
indent_style = space
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.glitchdotcom.json
.node-gyp
node_modules
.data
.DS_Store
.env
.firebase
test.*.log
tap.info
18 changes: 18 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root: true

rules:
eqeqeq: [error, allow-null]
no-unused-vars: [error, { vars: all, args: none, ignoreRestSiblings: true }]

parserOptions:
ecmaVersion: 'latest'
sourceType: 'module'

env:
node: true
es6: true
browser: true

extends:
- eslint:recommended
- prettier
32 changes: 16 additions & 16 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: gitleaks
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM
pull_request:
push:
workflow_dispatch:
schedule:
- cron: '0 4 * * *' # run once a day at 4 AM
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_NOTIFY_USER_LIST: "@sandergi, @clr-li"
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_NOTIFY_USER_LIST: '@sandergi, @clr-li'
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Automated Tests

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17'
- name: Setup Selenium Server
run: docker pull selenium/standalone-chrome:latest
- name: Start Selenium Server with access to host's localhost
run: docker run -d -p 4444:4444 --network="host" --shm-size=2g selenium/standalone-chrome:latest
- name: Install dependencies
run: npm ci
- name: Create Service Account key for Firebase
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > gcloud.json
- name: Run tests with chrome
run: |
SELENIUM_REMOTE_URL="http://localhost:4444/wd/hub" SELENIUM_BROWSER=chrome npm test
env:
TOKEN: ${{ secrets.TOKEN }}
GOOGLE_APPLICATION_CREDENTIALS: 'gcloud.json'
MERCHANTID: ${{ secrets.MERCHANTID }}
MERCHANTPUBLIC: ${{ secrets.MERCHANTPUBLIC }}
MERCHANTPRIVATE: ${{ secrets.MERCHANTPRIVATE }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ node_modules
.DS_Store
.env
.firebase
package-lock.json
test.log
test.*.log
tap.info
43 changes: 0 additions & 43 deletions .glitch-assets

This file was deleted.

10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.glitchdotcom.json
.node-gyp
node_modules
.data
.DS_Store
.env
.firebase
test.*.log
tap.info
**/*.min.js
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 100,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "auto"
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}
Loading

0 comments on commit 0749c22

Please sign in to comment.