Skip to content

Commit 0efb959

Browse files
authored
Merge pull request #116 from sugarlabs/develop
Release v1.0.0
2 parents b83e620 + c4e49fc commit 0efb959

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+13563
-9899
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Don't ignore contents of .prototype directory
2+
!src/.prototype

.eslintrc.json

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,55 @@
1010
},
1111
"plugins": ["@typescript-eslint"],
1212
"rules": {
13+
"@typescript-eslint/ban-ts-comment": "off",
14+
"@typescript-eslint/no-inferrable-types": "off",
15+
"@typescript-eslint/no-empty-interface": "off",
16+
"@typescript-eslint/no-non-null-assertion": "off",
1317
"no-mixed-spaces-and-tabs": "warn",
14-
"no-unused-vars": "warn",
18+
"no-unused-vars": "off",
19+
"@typescript-eslint/no-unused-vars": [
20+
"warn",
21+
{
22+
"argsIgnorePattern": "^_",
23+
"varsIgnorePattern": "^_"
24+
}
25+
],
1526
"no-use-before-define": "off",
16-
"@typescript-eslint/no-use-before-define": ["error"],
17-
"quotes": ["warn", "single", { "avoidEscape": true }],
27+
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
28+
"quotes": [
29+
"warn",
30+
"single",
31+
{
32+
"avoidEscape": true
33+
}
34+
],
1835
"semi": ["error", "always"],
1936
"prefer-const": ["warn"],
20-
// "no-console": "warn",
37+
"no-console": "warn",
2138
"max-len": [
2239
"warn",
2340
{
2441
"code": 100,
25-
"ignoreTrailingComments": true,
26-
"ignoreComments": true,
42+
"ignoreTrailingComments": false,
43+
"ignoreComments": false,
2744
"ignoreStrings": true,
2845
"ignoreTemplateLiterals": true
2946
}
3047
],
31-
"no-trailing-spaces": ["warn", { "skipBlankLines": true, "ignoreComments": true }],
48+
"no-trailing-spaces": [
49+
"warn",
50+
{
51+
"skipBlankLines": true,
52+
"ignoreComments": true
53+
}
54+
],
3255
"no-duplicate-case": "error",
3356
"no-irregular-whitespace": "warn"
3457
},
35-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"]
58+
"extends": [
59+
"eslint:recommended",
60+
"plugin:@typescript-eslint/recommended",
61+
"prettier",
62+
"plugin:json/recommended-with-comments"
63+
]
3664
}

.github/linters/.eslintrc.json

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

.github/workflows/CD.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
# Documentation:https://help.github.com/en/articles/workflow-syntax-for-github-actions
3+
4+
name: Continuous Deployment
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
lint:
14+
name: Lint Code Base
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
node-version: [16.x]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- name: Checkout the code base
25+
uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v2
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
34+
- name: Install dependencies
35+
run: |
36+
yarn install --frozen-lockfile
37+
38+
- name: Lint new and edited files
39+
uses: github/super-linter/slim@v4
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
DEFAULT_BRANCH: develop
43+
LINTER_RULES_PATH: /
44+
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
45+
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
46+
MARKDOWN_CONFIG_FILE: .markdownlint.jsonc
47+
VALIDATE_ALL_CODEBASE: false
48+
VALIDATE_DOCKERFILE: false
49+
VALIDATE_DOCKERFILE_HADOLINT: false
50+
VALIDATE_JAVASCRIPT_STANDARD: false
51+
VALIDATE_TYPESCRIPT_STANDARD: false
52+
VALIDATE_JSCPD: false
53+
VALIDATE_PYTHON: false
54+
VALIDATE_PYTHON_BLACK: false
55+
VALIDATE_PYTHON_FLAKE8: false
56+
VALIDATE_PYTHON_ISORT: false
57+
VALIDATE_PYTHON_MYPY: false
58+
VALIDATE_PYTHON_PYLINT: false
59+
60+
smoke-test:
61+
name: Smoke Test
62+
63+
strategy:
64+
matrix:
65+
os: [ubuntu-latest]
66+
node-version: [16.x]
67+
68+
runs-on: ${{ matrix.os }}
69+
70+
steps:
71+
- name: Checkout the code base
72+
uses: actions/checkout@v2
73+
with:
74+
fetch-depth: 0
75+
76+
- name: Setup Node.js ${{ matrix.node-version }}
77+
uses: actions/setup-node@v2
78+
with:
79+
node-version: ${{ matrix.node-version }}
80+
81+
- name: Install dependencies
82+
run: yarn install --frozen-lockfile
83+
84+
- name: Build the project
85+
run: yarn run build
86+
87+
regression-test:
88+
name: Regression Test
89+
90+
strategy:
91+
matrix:
92+
os: [ubuntu-latest]
93+
node-version: [16.x]
94+
95+
runs-on: ${{ matrix.os }}
96+
97+
steps:
98+
- name: Checkout the code base
99+
uses: actions/checkout@v2
100+
with:
101+
fetch-depth: 0
102+
103+
- name: Setup Node.js ${{ matrix.node-version }}
104+
uses: actions/setup-node@v2
105+
with:
106+
node-version: ${{ matrix.node-version }}
107+
108+
- name: Install dependencies
109+
run: yarn install --frozen-lockfile
110+
111+
- name: Run unit tests
112+
run: yarn run test
113+
114+
deploy:
115+
name: Deploy package to GitHub npm registry
116+
117+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true)
118+
needs: [lint, smoke-test, regression-test]
119+
120+
strategy:
121+
matrix:
122+
os: [ubuntu-latest]
123+
node-version: [16.x]
124+
125+
runs-on: ${{ matrix.os }}
126+
127+
steps:
128+
- name: Checkout the code base
129+
uses: actions/checkout@v2
130+
with:
131+
fetch-depth: 0
132+
133+
- name: Setup Node.js ${{ matrix.node-version }}
134+
uses: actions/setup-node@v2
135+
with:
136+
node-version: ${{ matrix.node-version }}
137+
138+
- name: Install dependencies
139+
run: yarn install --frozen-lockfile
140+
141+
- name: Deploy to registry
142+
run: |
143+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
144+
npm run build
145+
cp package.json dist/package.json
146+
cp README.md dist/README.md
147+
cd dist
148+
npm pack
149+
cp ./*.tgz ../
150+
cd ..
151+
npm publish "$(set -- *.tgz; echo "$1")"
152+
rm -rf dist ./*.tgz .npmrc

.github/workflows/CI.yml

Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,65 @@
11
---
2-
#######################
3-
#######################
4-
## CI GitHub Actions ##
5-
#######################
6-
#######################
7-
name: Continuous Integration
2+
# Documentation:https://help.github.com/en/articles/workflow-syntax-for-github-actions
83

9-
#
10-
# Documentation:
11-
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12-
#
4+
name: Continuous Integration
135

14-
#############################
15-
# Start the job on all push #
16-
#############################
176
on:
187
push:
19-
branches: [develop, main]
8+
branches: [develop]
209
pull_request:
21-
branches: [develop, main]
10+
branches: [develop]
2211

23-
###############
24-
# Set the Job #
25-
###############
2612
jobs:
27-
build:
28-
# Name the Job
29-
name: Continuous Integration
30-
# Set the agent to run on
31-
runs-on: ubuntu-latest
13+
smoke-test:
14+
name: Smoke Test
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
node-version: [16.x]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- name: Checkout the code base
25+
uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v2
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
34+
- name: Install dependencies
35+
run: yarn install --frozen-lockfile
36+
37+
- name: Build the project
38+
run: yarn run build
39+
40+
regression-test:
41+
name: Regression Test
3242

3343
strategy:
3444
matrix:
35-
node-version: [12.x, 14.x]
45+
os: [ubuntu-latest]
46+
node-version: [16.x]
47+
48+
runs-on: ${{ matrix.os }}
3649

37-
##################
38-
# Load all steps #
39-
##################
4050
steps:
41-
##########################
42-
# Checkout the code base #
43-
##########################
44-
- uses: actions/checkout@v2
51+
- name: Checkout the code base
52+
uses: actions/checkout@v2
4553
with:
4654
fetch-depth: 0
47-
- name: Use Node.js ${{ matrix.node-version }}
48-
uses: actions/setup-node@v1
55+
56+
- name: Setup Node.js ${{ matrix.node-version }}
57+
uses: actions/setup-node@v2
4958
with:
5059
node-version: ${{ matrix.node-version }}
5160

52-
###################
53-
# Run npm scripts #
54-
###################
61+
- name: Install dependencies
62+
run: yarn install --frozen-lockfile
5563

56-
- run: npm ci
57-
# - run: npm run build --if-present
58-
- run: npm test --if-present
59-
env:
60-
DEFAULT_BRANCH: develop
64+
- name: Run unit tests
65+
run: yarn run test

0 commit comments

Comments
 (0)