Bump com.puppycrawl.tools:checkstyle from 10.20.2 to 10.21.0 (#945) #1364
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
name: Java Maven | |
# https://github.com/laboratoriobridge/metafy/blob/d2f4fd53ef3783140cece9d5f2a57045304266dc/.github/workflows/maven.yml | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- master # Push events on master branch | |
- master # Push events on main branch | |
- 'releases/*' # Push events to branches matching refs/heads/releases/* | |
- 'refs/tags/*' # Push events to branches matching refs/heads/tags/* | |
- '!refs/pull/*' # Push events on branches that do not match refs/pull/* | |
pull_request: | |
branches: | |
- master | |
- main | |
jobs: | |
test: | |
name: mvn JDK ${{ matrix.java_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
java_version: ['11', '17', '21'] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java_version }} | |
distribution: 'adopt' # use Corretto once supported https://github.com/actions/setup-java/issues/68 | |
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-java${{ matrix.java_version }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-java${{ matrix.java_version }}-m2 | |
- name: Build with Maven | |
run: | | |
mvn clean verify --activate-profiles=coverage,pack | |
- name: Codecov upload | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./dbeam-core/target/site/jacoco/jacoco.xml | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: true # optional (default = false) | |
- name: End to end tests | |
if: matrix.java_version == '17' | |
run: ./e2e/e2e.sh | |
- run: mkdir staging && cp /tmp/debeam_e2e.log ./staging | |
if: matrix.java_version == '17' | |
- uses: actions/upload-artifact@v4 | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && matrix.java_version == '17' | |
with: | |
name: Package | |
path: staging | |
deploy: | |
# https://docs.github.com/en/actions/guides/publishing-java-packages-with-maven#publishing-packages-to-github-packages | |
name: Deploy | |
runs-on: 'ubuntu-latest' | |
needs: [test] | |
environment: main_env | |
permissions: | |
contents: read | |
packages: write | |
# Disable it, since it was failing on sonatype deploy. TODO: fix | |
if: false && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
steps: | |
- uses: actions/checkout@v4 | |
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: Linux-java11-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: Linux-java11-m2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'adopt' # use Corretto once supported https://github.com/actions/setup-java/issues/68 | |
- name: Deploy | |
env: | |
GPG_KEY: ${{ secrets.GPG_KEY }} | |
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export GPG_TTY=$(tty) | |
export DISPLAY=:0 | |
gpg --version | |
echo "$GPG_KEY" | base64 --decode --ignore-garbage | gpg --batch --fast-import - | |
gpg --list-secret-keys --keyid-format LONG | |
echo "test" | gpg --batch --clearsign --pinentry-mode loopback || true | |
mvn --settings ./github-settings.xml -DskipTests deploy | |
rm -rf ~/.gnupg |