-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from cnescatlab/dev
Release 3.0.0
- Loading branch information
Showing
31 changed files
with
552 additions
and
1,547 deletions.
There are no files selected for viewing
This file contains 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 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,57 @@ | ||
# Description | ||
# =========== | ||
# This workflow is triggered each time a milestone is closed | ||
# It builds the jar, generates release notes, pushes a new tag | ||
# and makes a draft release with these elements. | ||
--- | ||
name: Draft Release | ||
|
||
on: | ||
milestone: | ||
types: [closed] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: Setup java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build with Maven | ||
run: mvn -B clean package | ||
- name: Create Release Notes | ||
uses: docker://decathlon/release-notes-generator-action:2.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OUTPUT_FOLDER: temp_release_notes | ||
- name: Set tag and project values | ||
run: | | ||
echo "tag=$(cat pom.xml | grep "<version>.*</version>" | head -1 |awk -F'[><]' '{print $3}')" >> $GITHUB_ENV | ||
echo "project=$(echo ${{ github.repository }} | awk -F '/' '{print $2}')" >> $GITHUB_ENV | ||
- name: Create a tag for the release | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email [email protected] | ||
git tag -a ${{ env.tag }} -m "Release ${{ env.tag }}" | ||
git push origin ${{ env.tag }} | ||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
artifacts: "target/${{ env.project }}-${{ env.tag }}.jar" | ||
tag: ${{ env.tag }} | ||
name: ${{ env.project }} ${{ env.tag }} | ||
bodyFile: "temp_release_notes/release_file.md" | ||
draft: true | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,69 @@ | ||
# Description | ||
# =========== | ||
# This workflow is triggered each time | ||
# commits are pushed to GitHub or a pull request is opened. | ||
# It launches three jobs in parallel : a build with java 8, | ||
# a build with java 11 and a SonarCloud analysis. | ||
--- | ||
name: Java CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
name: Java 11 CI | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 11 | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Build with Maven | ||
run: mvn -B clean test package | ||
|
||
code-analysis: | ||
runs-on: ubuntu-latest | ||
name: SonarCloud Code Analysis | ||
# It's not possible to launch an analysis on external pull requests | ||
if: ${{ github.repository_owner == 'cnescatlab' }} | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Setup java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Build and analyze | ||
env: | ||
# Needed to get some information about the pull request, if any | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/ | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.organization=lequal -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN |
This file contains 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 |
---|---|---|
|
@@ -28,4 +28,5 @@ buildNumber.properties | |
|
||
# Ignore IntelliJ files | ||
.idea | ||
*.iml | ||
*.iml | ||
.vscode |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -7,15 +7,15 @@ | |
|
||
SonarQube plugin for the code analysis tool: i-Code CNES. | ||
|
||
SonarQube is an open platform to manage code quality. This plugin adds the ability to check Fortran (77 & 90) & Shell with i-Code or import pre-existing results of i-Code. | ||
SonarQube is an open platform to manage code quality. This plugin adds the ability to check Fortran (77 & 90) with i-Code or import pre-existing results of i-Code. | ||
|
||
This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. | ||
|
||
You can get i-Code CNES on GitHub: [lequal/i-CodeCNES](https://github.com/lequal/i-CodeCNES). | ||
You can get i-Code CNES on GitHub: [cnescatlab/i-CodeCNES](https://github.com/cnescatlab/i-CodeCNES). | ||
|
||
### Quickstart | ||
- Setup a SonarQube instance. | ||
- **[Optional]** Install i-Code command line application as described in [official documentation](https://github.com/lequal/i-CodeCNES/wiki/Installation-Manual). | ||
- **[Optional]** Install i-Code command line application as described in [official documentation](https://github.com/cnescatlab/i-CodeCNES/wiki/Installation-Manual). | ||
- Install `sonaricode-*.jar` in `<SONARQUBE_HOME>/extensions/plugins/`. | ||
- **[Optional]** Run i-Code manually or configure auto-launch in plugin configuration. | ||
- Run an analysis with *sonar-scanner*, *maven*, *gradle*, *msbuild*, etc. | ||
|
@@ -33,30 +33,28 @@ Here is the compatibility matrix of the plugin: | |
| 2.0.2 | 4.1.0 | 7.9 -> 8.2 | | ||
|
||
#### Run i-Code manually | ||
If you need help to run i-Code please refer to the [official user manual](https://github.com/lequal/i-CodeCNES/wiki/User-Manual) or [i-Code issue tracker](https://github.com/lequal/i-CodeCNES/issues). | ||
If you need help to run i-Code please refer to the [official user manual](https://github.com/cnescatlab/i-CodeCNES/wiki/User-Manual) or [i-Code issue tracker](https://github.com/cnescatlab/i-CodeCNES/issues). | ||
|
||
#### Run a specific i-Code version through sonaricode plugin | ||
If embedded version of i-Code does not match your need, you can set the execution of another installed version of i-Code through the following properties: | ||
- `sonar.icode.launch`: Activate autolaunch for i-Code if `true`. Default: `false`. | ||
- `sonar.icode.path`: Define i-Code CNES executable path to auto-launch it on analysis. Default: `${HOME}/icode-cnes/icode.exe`. | ||
|
||
#### Other plugin's properties | ||
- `sonar.icode.shell.file.suffixes`: List of suffixes for Shell files to analyze. Default: `.sh,.ksh,.bash`. | ||
- `sonar.icode.f77.file.suffixes`: List of suffixes for F77 files to analyze. Default: `.f,.f77,.for,.fpp,.ftn,.F,.F77,.FOR,.FPP,.FTN`. | ||
- `sonar.icode.f90.file.suffixes`: List of suffixes for F90 files to analyze. Default: `.f90,.F90`. | ||
- `sonar.icode.reports.path`: Path to the i-Code reports. Multiple path can be provided. Default: `result.res`. | ||
|
||
### Features | ||
- Fortran 77 analysis | ||
- Fortran 90 analysis | ||
- Shell analysis | ||
- Import i-Code results | ||
|
||
#### Get i-Code help | ||
Use `icode -h` to get the following help about i-Code: | ||
```` | ||
usage: icode [<FILE> [...]] [-c <arg>] [-e] [-f <arg>] [-h] [-l] [-o <arg>] [-p <arg>] [-q <arg>] [-r] [-x <arg>] | ||
Analyze Shell, F77 & F90 code to find defects & bugs. | ||
Analyze F77 & F90 code to find defects & bugs. | ||
-c,--checked-languages <arg> Comma separated list of languages checked during analysis. All by default. | ||
-e,--exporters Display all available exporters. | ||
|
@@ -70,20 +68,20 @@ Analyze Shell, F77 & F90 code to find defects & bugs. | |
-r,--rules Display all available rules. | ||
-x,--excluded-rules <arg> Comma separated list of rules id to exclude from analysis. None by default. | ||
Please report issues at https://github.com/lequal/i-CodeCNES/issues | ||
Please report issues at https://github.com/leqcnescatlabual/i-CodeCNES/issues | ||
```` | ||
|
||
### How to contribute | ||
If you experienced a problem with the plugin please open an issue. Inside this issue please explain us how to reproduce this issue and paste the log. | ||
|
||
If you want to do a PR, please put inside of it the reason of this pull request. If this pull request fix an issue please insert the number of the issue or explain inside of the PR how to reproduce this issue. | ||
|
||
All details are available in [CONTRIBUTING](https://github.com/lequal/sonar-icode-cnes-plugin/CONTRIBUTING.md). | ||
All details are available in [CONTRIBUTING](https://github.com/cnescatlab/sonar-icode-cnes-plugin/blob/master/CONTRIBUTING.md). | ||
|
||
### Feedback and Support | ||
Contact : [email protected] | ||
|
||
Bugs and Feature requests: https://github.com/lequal/sonar-icode-cnes-plugin/issues | ||
Bugs and Feature requests: https://github.com/cnescatlab/sonar-icode-cnes-plugin/issues | ||
|
||
### License | ||
Licensed under the [GNU General Public License, Version 3.0](https://www.gnu.org/licenses/gpl.txt) |
This file contains 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 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
Oops, something went wrong.