Skip to content

Commit

Permalink
[gha] Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Jan 5, 2025
1 parent ac846c7 commit fbac2ee
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 31 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs:
matrix:
cache: [maven]
distribution: [temurin]
java: [17, 21, 23]
os: [ubuntu-latest, macos-latest, windows-latest]
java: [17, 21]
os: [macos-latest, ubuntu-latest, windows-latest]
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
- name: Setup Java ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v4
with:
cache: ${{ matrix.cache }}
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Run tests using install (Linux)
run: xvfb-run -a ./mvnw install -B -V --no-transfer-progress -D"license.skip=true"
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
52 changes: 27 additions & 25 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: "CodeQL"

on:
push:
branches: [ 'master' ]
branches: [ "master" ]
pull_request:
branches: [ 'master' ]
branches: [ "master" ]
schedule:
- cron: '30 7 * * 5'
- cron: "43 10 * * 2"

jobs:
analyze:
Expand All @@ -20,27 +20,29 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
language: [ javascript, java ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
java-version: 21
distribution: 'temurin'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
27 changes: 27 additions & 0 deletions .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Coveralls

on: [push, pull_request]

jobs:
coveralls:
if: github.repository_owner == 'hazendaz'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
distribution: temurin
java-version: 21
- name: Report Coverage to Coveralls for Pull Requests
if: github.event_name == 'pull_request'
run: xvfb-run -a ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
- name: Report Coverage to Coveralls for General Push
if: github.event_name == 'push'
run: xvfb-run -a ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonatype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: maven
Expand Down

0 comments on commit fbac2ee

Please sign in to comment.