-
-
Notifications
You must be signed in to change notification settings - Fork 3
Add initial workflow to run tests #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1cad22c
Add initial workflow to run tests
sergeyklay af702a6
Add license
sergeyklay 071d4cc
Setup tests coverage
sergeyklay 56e4137
Setup gitignore
sergeyklay f3bdf74
Instal ldev dependencies
sergeyklay 64f5442
Add project description
sergeyklay 1ccfa86
Disable cache
sergeyklay 389e140
Enable cache
sergeyklay 14cc509
Disable cache
sergeyklay 5a67bf4
Add badges
sergeyklay 59a137d
Update actions/checkout from v5 to v6
sergeyklay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| # This is to make sure that there is no broken CI on | ||
| # the main branch, and also for Sonarqube integration | ||
| - main | ||
| # We need it for better Sonarqube integration | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # The maximum number of minutes to let a workflow run | ||
| # before GitHub automatically cancels it. Default: 360 | ||
| timeout-minutes: 30 | ||
|
|
||
| strategy: | ||
| # When set to true, GitHub cancels | ||
| # all in-progress jobs if any matrix job fails. | ||
| fail-fast: false | ||
|
|
||
| concurrency: | ||
| # Cancel any currently running job or workflow in the same concurrency group. | ||
| # The group is a unique identifier for the workflow run. | ||
| # | ||
| # Explanation: | ||
| # - github.workflow: The name of the workflow (e.g. Workflow 1). | ||
| # - github.event.pull_request.number: The number of the pull request (when the trigger event is a PR). | ||
| # - github.ref: The branch name (when the trigger is not a PR but a push). | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: npm | ||
|
|
||
| - name: Get npm cache directory | ||
| id: npm-cache-dir | ||
| shell: bash | ||
| run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | ||
|
|
||
| - name: Setup npm cache | ||
| id: npm-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
|
|
||
| - name: Install Dependencies | ||
| # Disable cache for now to test the workflow. | ||
| # if: steps.npm-cache.outputs.cache-hit != 'true' | ||
| run: npm ci --include=dev | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Run unit tests | ||
| run: npm run test:coverage | ||
|
|
||
| - uses: codecov/codecov-action@v5 | ||
| with: | ||
| fail_ci_if_error: true | ||
| flags: unittests | ||
| name: codecov-umbrella | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| verbose: true | ||
|
|
||
| - name: Success Reporting | ||
| if: success() | ||
| run: git log --format=fuller -5 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,27 @@ | ||
| .next | ||
| node_modules | ||
| # Please do not use this ignore file to define platform specific files. | ||
| # | ||
| # For these purposes create a global .gitignore file, which is a list of rules | ||
| # for ignoring files in every Git repository on your workstation. | ||
| # | ||
| # https://help.github.com/articles/ignoring-files/#create-a-global-gitignore | ||
|
|
||
| # Do not ignore .cursor commands and rules. | ||
| !/.cursor/rules/*.mdc | ||
| !/.cursor/commands/*.md | ||
|
|
||
| # Application and docker compose environment variables. | ||
| /.env | ||
|
|
||
| # Next.js output | ||
| /.next | ||
|
|
||
| # Node modules | ||
| /node_modules | ||
|
|
||
| # SQLite database files | ||
| data/*.db | ||
| data/*.db-wal | ||
| data/*.db-shm | ||
| /data/*.db | ||
| /data/*.db-wal | ||
| /data/*.db-shm | ||
|
|
||
| # Code coverage stuff. | ||
| /coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) 2025 Serghei Iakovlev. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| this software and associated documentation files (the "Software"), to deal in | ||
| the Software without restriction, including without limitation the rights to | ||
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| the Software, and to permit persons to whom the Software is furnished to do so, | ||
| subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.