Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Qodana

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
qodana-docker:
runs-on: ubuntu-latest

steps:
# Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3

# Set up Docker Buildx
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Run Qodana analysis inside Docker and save CLI output to a log file
- name: Run Qodana via Docker
run: |
mkdir -p ${{ github.workspace }}/qodana-results
docker run --rm \
-v ${{ github.workspace }}:/data \
-v ${{ github.workspace }}/qodana-results:/data/results \
-w /data \
jetbrains/qodana-jvm-community:2024.1 | tee ${{ github.workspace }}/qodana-results/qodana.log

# Upload the Qodana results as a workflow artifact for download
- name: Upload Qodana Report
uses: actions/upload-artifact@v4
with:
name: Qodana Report
path: ${{ github.workspace }}/qodana-results

# Remove previous Qodana Report Info steps and add a new concise summary
- name: Qodana Summary
if: always()
run: |
echo "### Qodana - Run Status" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Qodana analysis has completed. For detailed results and findings, please download the Qodana report artifact from the Artifacts section below." >> $GITHUB_STEP_SUMMARY
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Qodana](https://github.com/pedr0limpio/tasky/actions/workflows/qodana.yml/badge.svg)](https://github.com/pedr0limpio/tasky/actions/workflows/qodana.yml)
![build badge](https://github.com/pedr0limpio/tasky/actions/workflows/maven.yml/badge.svg?event=push&branch=main)
# Tasky - a simple todo tool

Expand Down Expand Up @@ -43,4 +44,4 @@ If you want to learn more about building native executables, please consult <htt

- SmallRye GraphQL ([guide](https://quarkus.io/guides/smallrye-graphql)): Create GraphQL Endpoints using the code-first
approach from MicroProfile GraphQL.
- Tips and Infos ([here](SETUP.md))
- Tips and Infos ([here](SETUP.md))
2 changes: 2 additions & 0 deletions src/main/java/br/com/pedr0limpio/resources/TaskResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public Task searchById(int id) {
@Mutation
@Transactional
public Task editById(int id, Task taskFor) { //TODO[#4]: Implement the editById(int id, Task taskFor) method to update a task
// Intentional unused variable for Qodana test
String unusedQodanaTest = "This variable is not used";
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the test class.

try {
taskBaseDAO.update(id, taskFor);
return taskFor;
Expand Down