Bump codecov/codecov-action from 3 to 4 #318
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "**" ] | |
workflow_call: {} | |
workflow_dispatch: {} | |
jobs: | |
build: | |
name: Build (Java ${{ matrix.java-version }} on ${{ matrix.os-name }}) | |
runs-on: ${{ matrix.os-name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os-name: [ubuntu-latest, macos-latest, windows-latest] | |
java-version: [11, 21] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Install protoc onto the PATH so that we can test PATH resolution. | |
- name: Install protoc | |
shell: bash | |
run: |- | |
case "${{ matrix.os-name }}" in | |
macos-*) brew install protobuf ;; | |
ubuntu-*) sudo apt update -q && sudo apt install protobuf-compiler -qy ;; | |
windows-*) choco install protoc ;; | |
esac | |
protoc --version | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Build and test | |
shell: bash | |
run: ./mvnw -B verify | |
- name: Publish code coverage | |
uses: codecov/codecov-action@v4 | |
continue-on-error: true | |
if: always() |