Skip to content

Commit

Permalink
ci: Add qodana analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
PeyaPeyaPeyang committed Mar 14, 2024
1 parent a935586 commit 73f736c
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/qodana-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,40 @@ on:

jobs:
qodana:
strategy:
matrix:
minecraft: [1.16.5]
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- run: mkdir -p nms-build/.m2/repository
- name: Restore cached NMS
id: cache-nms-restore
uses: actions/cache/restore@v4
with:
fetch-depth: 0
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.2
path: |
nms-build/.m2/repository
key: nms-spigot-${{ matrix.minecraft }}
- uses: PeyaPeyaPeyang/nmsaction@v3
if: "steps.sj.outputs.cache-hit != 'true'"
if: "steps.cache-nms-restore.outputs.cache-hit != 'true'"
with:
rev: ${{ matrix.minecraft }}
- name: Save NMS to cache
id: cache-nms-save
uses: actions/cache/save@v4
if: "steps.cache-nms-restore.outputs.cache-hit != 'true'"
with:
rev: 1.16.5
- name: Install nms into m2
if: "steps.sj.outputs.cache-hit != 'true'"
path: |
nms-build/.m2/repository
key: nms-spigot-${{ matrix.minecraft }}
- name: Retrieve the absolute path of .m2
id: m2-path
run: |
mkdir -p $HOME/.m2/repository
cp -a nms-build/.m2/repository/. $HOME/.m2/repository
M2_PATH=$(pwd)/nms-build/.m2/repository
echo "m2-path=$M2_PATH" >> $GITHUB_OUTPUT
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@main
with:
args: --volume,${{ steps.m2-path.outputs.m2-path }}:/root/.m2/repository
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

0 comments on commit 73f736c

Please sign in to comment.