Skip to content
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

Run workflows even on Windows #643

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
85 changes: 0 additions & 85 deletions .github/issuehunt-shield-v1.svg

This file was deleted.

47 changes: 36 additions & 11 deletions .github/workflows/gradle.yml
Expand Up @@ -9,8 +9,8 @@ on:
- master

jobs:
build:
runs-on: ubuntu-latest
sonar-and-semantic-release:
runs-on: 'ubuntu-latest'
strategy:
matrix:
gradle: ['7.0', '7.3.3']
Expand All @@ -24,23 +24,19 @@ jobs:
distribution: 'temurin'
java-version: 11
cache: gradle
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
node-version-file: '.nvmrc'
cache: npm
if: matrix.gradle == '7.0'
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
./gradlew build --no-daemon -Dsnom.test.functional.gradle=${{ matrix.gradle }}
./gradlew build --no-daemon
echo Verifying the java version used in class files...
cd build/classes/groovy/main
javap -v com.github.spotbugs.snom.SpotBugsPlugin | grep -q 'major version: 52'
Expand All @@ -51,20 +47,49 @@ jobs:
rm -rf build/libs/*.jar
npm ci
npx semantic-release
if: matrix.gradle == '7.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run SonarQube Scanner
run: |
if [ "$SONAR_LOGIN" != "" ]; then
./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN --no-daemon
fi
if: matrix.gradle == '7.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
- uses: actions/upload-artifact@v2
if: always()
with:
name: reports (Gradle ${{ matrix.gradle }})
name: reports
path: build/reports
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
gradle: ['7.0', '7.3.3']
os: ['ubuntu-latest', 'windows-latest']
exclude:
# used in the sonar-and-semantic-release job
- gradle: '7.3.3'
os: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
cache: gradle
- name: Build with Gradle
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
./gradlew build --no-daemon "-Dsnom.test.functional.gradle=${{ matrix.gradle }}"
- uses: actions/upload-artifact@v2
if: always()
with:
name: reports (Gradle ${{ matrix.gradle }} on ${{ matrix.os }})
path: build/reports
3 changes: 0 additions & 3 deletions .nvmrc
@@ -1,4 +1 @@
16

# semantic-release v18.0.0 recommends to use 14.17 or above
# https://github.com/semantic-release/semantic-release/releases/tag/v18.0.0
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -7,7 +7,6 @@ This is the official Gradle Plugin to run SpotBugs on Java and Android project.
[![Debt](https://sonarcloud.io/api/project_badges/measure?project=com.github.spotbugs.gradle&metric=sqale_index)](https://sonarcloud.io/component_measures/domain/Maintainability?id=com.github.spotbugs.gradle)
[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v?label=Plugin+Portal&metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Fcom%2Fgithub%2Fspotbugs%2Fcom.github.spotbugs.gradle.plugin%2Fmaven-metadata.xml)](https://plugins.gradle.org/plugin/com.github.spotbugs)
[![](https://img.shields.io/badge/groovydoc-latest-blightgreen?logo=groovy)](https://spotbugs-gradle-plugin.netlify.com/com/github/spotbugs/snom/package-summary.html)
[![Issue Hunt](./.github/issuehunt-shield-v1.svg)](https://issuehunt.io/r/spotbugs/spotbugs-gradle-plugin)

## Goal

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Expand Up @@ -3,10 +3,10 @@ plugins {
id 'java-gradle-plugin'
id 'jacoco'
id 'signing'
id 'com.gradle.plugin-publish' version '0.19.0'
id 'com.gradle.plugin-publish' version '0.20.0'
id 'com.github.spotbugs.gradle-plugin'
id 'org.sonarqube' version '3.3'
id 'com.github.spotbugs' version '5.0.3'
id 'com.github.spotbugs' version '5.0.5'
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -21,10 +21,10 @@ repositories {
}

ext {
errorproneVersion = '2.10.0'
errorproneVersion = '2.11.0'
spotBugsVersion = '4.5.3'
slf4jVersion = '1.8.0-beta4'
androidGradlePluginVersion = '7.0.4'
androidGradlePluginVersion = '7.1.1'
}

dependencies {
Expand Down