Skip to content

Commit 190184c

Browse files
committed
3.2.0 release
1 parent f8a5001 commit 190184c

50 files changed

Lines changed: 2943 additions & 4118 deletions

Some content is hidden

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

.github/workflows/build-bot.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,13 @@ jobs:
2121
shell: pwsh
2222
run: |
2323
$content = Get-Content -Path ${{env.FILE_PATH}}
24-
$content = $content -replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
24+
$content = $content -Replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
2525
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
2626
env:
2727
FILE_PATH: source/server/Karamem0.Commistant.Bot/wwwroot/index.html
2828
- name: Restore source
2929
run: dotnet restore
3030
working-directory: source/server
31-
- name: Test source
32-
shell: pwsh
33-
run: |
34-
dotnet test `
35-
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
36-
--filter TestCategory=Karamem0.Commistant.Bot `
37-
-p:AltCover=true `
38-
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
39-
working-directory: source/server
4031
- name: Build source
4132
shell: pwsh
4233
run: |
@@ -53,16 +44,3 @@ jobs:
5344
name: bot
5445
path: source/server/build
5546
include-hidden-files: true
56-
- name: Upload test results
57-
uses: enricomi/publish-unit-test-result-action/linux@v2
58-
if: always()
59-
with:
60-
files: source/server/test/*.xml
61-
check_name: Bot test results
62-
- name: Upload coverage reports
63-
uses: codecov/codecov-action@v4
64-
if: always()
65-
with:
66-
fail_ci_if_error: true
67-
token: ${{secrets.CODECOV_TOKEN}}
68-
slug: karamem0/commistant

.github/workflows/build-func.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ jobs:
2020
- name: Restore source
2121
run: dotnet restore
2222
working-directory: source/server
23-
- name: Test source
24-
shell: pwsh
25-
run: |
26-
dotnet test `
27-
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
28-
--filter TestCategory=Karamem0.Commistant.Functions `
29-
-p:AltCover=true `
30-
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
31-
working-directory: source/server
3223
- name: Build source
3324
shell: pwsh
3425
run: |
@@ -45,16 +36,3 @@ jobs:
4536
name: func
4637
path: source/server/build
4738
include-hidden-files: true
48-
- name: Upload test results
49-
uses: enricomi/publish-unit-test-result-action/linux@v2
50-
if: always()
51-
with:
52-
files: source/server/test/*.xml
53-
check_name: Func test results
54-
- name: Upload coverage reports
55-
uses: codecov/codecov-action@v4
56-
if: always()
57-
with:
58-
fail_ci_if_error: true
59-
token: ${{secrets.CODECOV_TOKEN}}
60-
slug: karamem0/commistant

.github/workflows/build-web.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
shell: pwsh
2626
run: |
2727
$content = Get-Content -Path ${{env.FILE_PATH}}
28-
$content = $content -replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
29-
$content = $content -replace "{{TELEMETRY_CONNECTION_STRING}}", "${{vars.TELEMETRY_CONNECTION_STRING}}"
28+
$content = $content -Replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
29+
$content = $content -Replace "{{TELEMETRY_CONNECTION_STRING}}", "${{vars.TELEMETRY_CONNECTION_STRING}}"
3030
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
3131
env:
3232
FILE_PATH: source/client/.env
@@ -42,15 +42,6 @@ jobs:
4242
- name: Restore server
4343
run: dotnet restore
4444
working-directory: source/server
45-
- name: Test source
46-
shell: pwsh
47-
run: |
48-
dotnet test `
49-
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
50-
--filter TestCategory=Karamem0.Commistant.Web `
51-
-p:AltCover=true `
52-
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
53-
working-directory: source/server
5445
- name: Build source
5546
shell: pwsh
5647
run: |
@@ -67,16 +58,3 @@ jobs:
6758
name: web
6859
path: source/server/build
6960
include-hidden-files: true
70-
- name: Upload test results
71-
uses: enricomi/publish-unit-test-result-action/linux@v2
72-
if: always()
73-
with:
74-
files: source/server/test/*.xml
75-
check_name: Web test results
76-
- name: Upload coverage reports
77-
uses: codecov/codecov-action@v4
78-
if: always()
79-
with:
80-
fail_ci_if_error: true
81-
token: ${{secrets.CODECOV_TOKEN}}
82-
slug: karamem0/commistant

.github/workflows/develop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
- develop
55

66
jobs:
7+
test:
8+
name: Test
9+
uses: ./.github/workflows/test.yml
10+
secrets: inherit
711
build-bot:
812
name: Build bot
13+
needs: test
914
uses: ./.github/workflows/build-bot.yml
1015
secrets: inherit
1116
with:
@@ -19,6 +24,7 @@ jobs:
1924
environment: dev
2025
build-web:
2126
name: Build web
27+
needs: test
2228
uses: ./.github/workflows/build-web.yml
2329
secrets: inherit
2430
with:
@@ -32,6 +38,7 @@ jobs:
3238
environment: dev
3339
build-func:
3440
name: Build func
41+
needs: test
3542
uses: ./.github/workflows/build-func.yml
3643
secrets: inherit
3744
with:

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on: workflow_call
2+
3+
jobs:
4+
run:
5+
name: Run
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repos
9+
uses: actions/checkout@v4
10+
- name: Setup .NET Core
11+
uses: actions/setup-dotnet@v4
12+
with:
13+
dotnet-version: 8.x
14+
- name: Test source
15+
shell: pwsh
16+
run: |
17+
dotnet test `
18+
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
19+
-p:AltCover=true `
20+
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
21+
working-directory: source/server
22+
- name: Test results
23+
uses: enricomi/publish-unit-test-result-action/linux@v2
24+
if: always()
25+
with:
26+
files: source/server/test/*.xml
27+
check_name: Bot test results
28+
- name: Upload coverage reports
29+
uses: codecov/codecov-action@v4
30+
if: always()
31+
with:
32+
fail_ci_if_error: true
33+
token: ${{secrets.CODECOV_TOKEN}}
34+
slug: karamem0/commistant

source/client/eslint.config.mjs

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,46 @@
66
// https://github.com/karamem0/commistant/blob/main/LICENSE
77
//
88

9-
import { FlatCompat } from '@eslint/eslintrc';
10-
import { fileURLToPath } from 'url';
11-
import { fixupConfigRules } from '@eslint/compat';
129
import globals from 'globals';
10+
import hooks from 'eslint-plugin-hooks';
1311
import js from '@eslint/js';
14-
import path from 'path';
15-
import pluginHooks from 'eslint-plugin-hooks';
12+
import jsxA11y from 'eslint-plugin-jsx-a11y';
13+
import react from 'eslint-plugin-react';
14+
import reactHooks from 'eslint-plugin-react-hooks';
15+
import sonarjs from 'eslint-plugin-sonarjs';
16+
import stylistic from '@stylistic/eslint-plugin';
17+
import ts from 'typescript-eslint';
1618

17-
const compat = new FlatCompat({
18-
baseDirectory: path.dirname(fileURLToPath(import.meta.url)),
19-
recommendedConfig: js.configs.recommended,
20-
allConfig: js.configs.all
21-
});
22-
23-
export default [
19+
export default ts.config(
20+
js.configs.recommended,
21+
ts.configs.recommended,
2422
{
2523
'languageOptions': {
2624
'globals': {
2725
...globals.browser,
28-
...globals.jest
26+
...globals.jest,
27+
...globals.node
2928
}
3029
},
3130
'plugins': {
32-
'hooks': pluginHooks
31+
'@stylistic': stylistic,
32+
'hooks': hooks,
33+
'jsx-a11y': jsxA11y,
34+
'react': react,
35+
'react-hooks': reactHooks,
36+
'sonarjs': sonarjs
3337
},
3438
'settings': {
39+
...sonarjs.configs.recommended.settings,
3540
'react': {
3641
'version': 'detect'
3742
}
3843
}
3944
},
40-
...fixupConfigRules(compat.extends(
41-
'plugin:@stylistic/recommended-extends',
42-
'plugin:@typescript-eslint/recommended',
43-
'plugin:jsx-a11y/recommended',
44-
'plugin:react/recommended',
45-
'plugin:react-hooks/recommended',
46-
'plugin:sonarjs/recommended-legacy'
47-
)),
4845
{
4946
'rules': {
47+
...reactHooks.configs.recommended.rules,
48+
...sonarjs.configs.recommended.rules,
5049
'dot-notation': [
5150
'error',
5251
{
@@ -115,7 +114,7 @@ export default [
115114
],
116115
'@stylistic/indent-binary-ops': [
117116
'error',
118-
4
117+
2
119118
],
120119
'@stylistic/jsx-closing-bracket-location': [
121120
'error',
@@ -195,7 +194,6 @@ export default [
195194
'varsIgnorePattern': '^_'
196195
}
197196
],
198-
'@typescript-eslint/no-use-before-define': 'error',
199197
'hooks/sort': [
200198
'error',
201199
{
@@ -218,14 +216,11 @@ export default [
218216
]
219217
}
220218
],
221-
'react/prop-types': 'off',
222-
'sonarjs/max-switch-cases': 'warn',
223-
'sonarjs/no-collapsible-if': 'warn',
224-
'sonarjs/no-duplicate-string': 'off',
225-
'sonarjs/no-small-switch': 'warn',
219+
'sonarjs/no-empty-function': 'off',
226220
'sonarjs/no-unknown-property': 'off',
227-
'sonarjs/prefer-single-boolean-return': 'off',
228-
'sonarjs/sonar-no-unused-vars': 'off'
221+
'sonarjs/no-unused-expressions': 'off',
222+
'sonarjs/no-unused-vars': 'off',
223+
'sonarjs/prefer-single-boolean-return': 'off'
229224
}
230225
}
231-
];
226+
);

0 commit comments

Comments
 (0)