Skip to content

Commit

Permalink
3.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
karamem0 committed Dec 11, 2024
1 parent f8a5001 commit 190184c
Show file tree
Hide file tree
Showing 50 changed files with 2,943 additions and 4,118 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/build-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,13 @@ jobs:
shell: pwsh
run: |
$content = Get-Content -Path ${{env.FILE_PATH}}
$content = $content -replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
$content = $content -Replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
env:
FILE_PATH: source/server/Karamem0.Commistant.Bot/wwwroot/index.html
- name: Restore source
run: dotnet restore
working-directory: source/server
- name: Test source
shell: pwsh
run: |
dotnet test `
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
--filter TestCategory=Karamem0.Commistant.Bot `
-p:AltCover=true `
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
working-directory: source/server
- name: Build source
shell: pwsh
run: |
Expand All @@ -53,16 +44,3 @@ jobs:
name: bot
path: source/server/build
include-hidden-files: true
- name: Upload test results
uses: enricomi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: source/server/test/*.xml
check_name: Bot test results
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: always()
with:
fail_ci_if_error: true
token: ${{secrets.CODECOV_TOKEN}}
slug: karamem0/commistant
22 changes: 0 additions & 22 deletions .github/workflows/build-func.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ jobs:
- name: Restore source
run: dotnet restore
working-directory: source/server
- name: Test source
shell: pwsh
run: |
dotnet test `
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
--filter TestCategory=Karamem0.Commistant.Functions `
-p:AltCover=true `
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
working-directory: source/server
- name: Build source
shell: pwsh
run: |
Expand All @@ -45,16 +36,3 @@ jobs:
name: func
path: source/server/build
include-hidden-files: true
- name: Upload test results
uses: enricomi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: source/server/test/*.xml
check_name: Func test results
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: always()
with:
fail_ci_if_error: true
token: ${{secrets.CODECOV_TOKEN}}
slug: karamem0/commistant
26 changes: 2 additions & 24 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
shell: pwsh
run: |
$content = Get-Content -Path ${{env.FILE_PATH}}
$content = $content -replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
$content = $content -replace "{{TELEMETRY_CONNECTION_STRING}}", "${{vars.TELEMETRY_CONNECTION_STRING}}"
$content = $content -Replace "{{APP_DOMAIN_NAME}}", "${{vars.APP_DOMAIN_NAME}}"
$content = $content -Replace "{{TELEMETRY_CONNECTION_STRING}}", "${{vars.TELEMETRY_CONNECTION_STRING}}"
Out-File -FilePath ${{env.FILE_PATH}} -InputObject $content -Encoding UTF8
env:
FILE_PATH: source/client/.env
Expand All @@ -42,15 +42,6 @@ jobs:
- name: Restore server
run: dotnet restore
working-directory: source/server
- name: Test source
shell: pwsh
run: |
dotnet test `
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
--filter TestCategory=Karamem0.Commistant.Web `
-p:AltCover=true `
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
working-directory: source/server
- name: Build source
shell: pwsh
run: |
Expand All @@ -67,16 +58,3 @@ jobs:
name: web
path: source/server/build
include-hidden-files: true
- name: Upload test results
uses: enricomi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: source/server/test/*.xml
check_name: Web test results
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: always()
with:
fail_ci_if_error: true
token: ${{secrets.CODECOV_TOKEN}}
slug: karamem0/commistant
7 changes: 7 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ on:
- develop

jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
secrets: inherit
build-bot:
name: Build bot
needs: test
uses: ./.github/workflows/build-bot.yml
secrets: inherit
with:
Expand All @@ -19,6 +24,7 @@ jobs:
environment: dev
build-web:
name: Build web
needs: test
uses: ./.github/workflows/build-web.yml
secrets: inherit
with:
Expand All @@ -32,6 +38,7 @@ jobs:
environment: dev
build-func:
name: Build func
needs: test
uses: ./.github/workflows/build-func.yml
secrets: inherit
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on: workflow_call

jobs:
run:
name: Run
runs-on: ubuntu-latest
steps:
- name: Checkout repos
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Test source
shell: pwsh
run: |
dotnet test `
Karamem0.Commistant.Tests/Karamem0.Commistant.Tests.csproj `
-p:AltCover=true `
-- NUnit.TestOutputXml=${{github.workspace}}/source/server/test
working-directory: source/server
- name: Test results
uses: enricomi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: source/server/test/*.xml
check_name: Bot test results
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: always()
with:
fail_ci_if_error: true
token: ${{secrets.CODECOV_TOKEN}}
slug: karamem0/commistant
59 changes: 27 additions & 32 deletions source/client/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,46 @@
// https://github.com/karamem0/commistant/blob/main/LICENSE
//

import { FlatCompat } from '@eslint/eslintrc';
import { fileURLToPath } from 'url';
import { fixupConfigRules } from '@eslint/compat';
import globals from 'globals';
import hooks from 'eslint-plugin-hooks';
import js from '@eslint/js';
import path from 'path';
import pluginHooks from 'eslint-plugin-hooks';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import sonarjs from 'eslint-plugin-sonarjs';
import stylistic from '@stylistic/eslint-plugin';
import ts from 'typescript-eslint';

const compat = new FlatCompat({
baseDirectory: path.dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
export default ts.config(
js.configs.recommended,
ts.configs.recommended,
{
'languageOptions': {
'globals': {
...globals.browser,
...globals.jest
...globals.jest,
...globals.node
}
},
'plugins': {
'hooks': pluginHooks
'@stylistic': stylistic,
'hooks': hooks,
'jsx-a11y': jsxA11y,
'react': react,
'react-hooks': reactHooks,
'sonarjs': sonarjs
},
'settings': {
...sonarjs.configs.recommended.settings,
'react': {
'version': 'detect'
}
}
},
...fixupConfigRules(compat.extends(
'plugin:@stylistic/recommended-extends',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:sonarjs/recommended-legacy'
)),
{
'rules': {
...reactHooks.configs.recommended.rules,
...sonarjs.configs.recommended.rules,
'dot-notation': [
'error',
{
Expand Down Expand Up @@ -115,7 +114,7 @@ export default [
],
'@stylistic/indent-binary-ops': [
'error',
4
2
],
'@stylistic/jsx-closing-bracket-location': [
'error',
Expand Down Expand Up @@ -195,7 +194,6 @@ export default [
'varsIgnorePattern': '^_'
}
],
'@typescript-eslint/no-use-before-define': 'error',
'hooks/sort': [
'error',
{
Expand All @@ -218,14 +216,11 @@ export default [
]
}
],
'react/prop-types': 'off',
'sonarjs/max-switch-cases': 'warn',
'sonarjs/no-collapsible-if': 'warn',
'sonarjs/no-duplicate-string': 'off',
'sonarjs/no-small-switch': 'warn',
'sonarjs/no-empty-function': 'off',
'sonarjs/no-unknown-property': 'off',
'sonarjs/prefer-single-boolean-return': 'off',
'sonarjs/sonar-no-unused-vars': 'off'
'sonarjs/no-unused-expressions': 'off',
'sonarjs/no-unused-vars': 'off',
'sonarjs/prefer-single-boolean-return': 'off'
}
}
];
);
Loading

0 comments on commit 190184c

Please sign in to comment.