Files
tasknote/.github/workflows/main.yml
T
rmcamposGitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a65e55caae feat: improve notes UI (#339)
* build(deps-dev): bump @eslint/eslintrc from 3.2.0 to 3.3.0 in /client

Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/eslint/eslintrc/releases)
- [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslintrc/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: "@eslint/eslintrc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump sass from 1.83.4 to 1.85.1 in /client

Bumps [sass](https://github.com/sass/dart-sass) from 1.83.4 to 1.85.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.83.4...1.85.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump react-i18next from 15.4.0 to 15.4.1 in /client

Bumps [react-i18next](https://github.com/i18next/react-i18next) from 15.4.0 to 15.4.1.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v15.4.0...v15.4.1)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump @types/node from 22.13.8 to 22.13.9 in /client

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.8 to 22.13.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump typescript from 5.7.3 to 5.8.2 in /client

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.3 to 5.8.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump actions/cache from 4.2.1 to 4.2.2

Bumps [actions/cache](https://github.com/actions/cache) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* feat: improve notes UI

issue #322

issue #337

issue #301

* feat: enable notes tracking for the users

* chore: reduce duplications creating components

* chore: fix wordy and add JS Docs

* test: add AlertError test cases

* feat: add contentHeader tests

* test: fix taskAdd test component

* test: add modalMarkdown test cases

* chore: refactor to reduce duplication

* test: add noteTitle component test case

* test: add more tests to About view

* test: add more tests to Account view

* test: add home view test cases

* test: add noteAdd view tests

* test: add note view test cases

* test: add note service unit tests

* chore: fix Sonar issues

* test: add more tests to note service

* chore: small fixes to backend

* test: fix noteAdd view test case

* chore: fix sonar issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 18:39:31 -03:00

127 lines
4.5 KiB
YAML

name: Main
on:
push:
branches:
- main
workflow_dispatch:
jobs:
client-code-checks:
name: Client Code Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Clean and Install
run: cd client && npm ci
- name: Build
run: cd client && npm run build
- name: Lint
run: cd client && npm run lint
- name: Unit tests
run: cd client && npm run test:coverage
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.0.0
with:
projectBaseDir: client
args: >
-Dsonar.organization=ricardo-campos-org
-Dsonar.projectKey=ricardo-campos-org_react-typescript-todolist_client
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.typescript.tsconfigPaths=tsconfig.json
-Dsonar.sources=src/
-Dsonar.exclusions=src/__test__/**
-Dsonar.tests=src/__test__/
-Dsonar.verbose=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
java-code-checks:
name: Server Code Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Cache SonarQube Cloud packages
uses: actions/cache@v4.2.2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v4.2.2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: cd server && ./mvnw --no-transfer-progress clean compile -DskipTests
- name: Google Checkstyle
run: cd server && ./mvnw --no-transfer-progress checkstyle:checkstyle -Dskip.checkstyle=false
- name: All Tests
run: cd server && ./mvnw --no-transfer-progress clean verify -P tests --file pom.xml
- name: Sonar Analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SERVER }}
run: |
cd server
./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=br.com.tasknoteapp:server -Dsonar.coverage.jacoco.xmlReportPaths=target/coverage-reports/merged-test-report/jacoco.xml -Dsonar.exclusions=**/config/**,**/entity/**,**/exception/**,**/filter/**,**/**Builder*,**/RestExceptionEndpoint.*,**/JavaApiApiApplication.*
image-promotion:
name: Docker image promotion
runs-on: ubuntu-latest
strategy:
matrix:
image:
- service: server
- service: client
steps:
- uses: docker/login-action@v3
name: Login to GitHub Container Registry
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull image with source tag
run: docker pull ghcr.io/ricardo-campos-org/react-typescript-todolist/${{ matrix.image.service }}:candidate
- name: Extract PR number using docker inspect
id: inspect
run: |
SOURCE_PR=$(docker inspect ghcr.io/ricardo-campos-org/react-typescript-todolist/${{ matrix.image.service }}:candidate | jq -r '.[0].Config.Env[] | select(startswith("SOURCE_PR="))' | sed -n 's/SOURCE_PR=\(v[0-9]*\).*/\1/p')
echo "SOURCE_PR=$SOURCE_PR" >> $GITHUB_ENV
echo "source_pr=$SOURCE_PR" >> $GITHUB_OUTPUT
- name: Re-tag the image
run: docker tag ghcr.io/ricardo-campos-org/react-typescript-todolist/${{ matrix.image.service }}:candidate ghcr.io/ricardo-campos-org/react-typescript-todolist/${{ matrix.image.service }}:prod-${{ steps.inspect.outputs.source_pr }}
- name: Push new tag
run: docker push ghcr.io/ricardo-campos-org/react-typescript-todolist/${{ matrix.image.service }}:prod-${{ steps.inspect.outputs.source_pr }}