Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Codecov config. Coverage comes from the RIC package (JaCoCo), measured on x86_64 and aarch64.
#
# threshold 1%: PRs upload the union of both archs while merges to main can land a
# single-arch report, so identical code can differ <1%. The tolerance avoids failing
# merges on that measurement noise. patch is off; project coverage is the gate.
# carryforward keeps a flag's last value when a commit doesn't re-upload it.
coverage:
status:
project:
default:
target: auto
threshold: 1%
patch: off

flag_management:
default_rules:
carryforward: true
49 changes: 49 additions & 0 deletions .github/workflows/runtime-interface-client_merge_to_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,57 @@
ENABLE_SNAPSHOT: ${{ secrets.ENABLE_SNAPSHOT }}
run: make publish

# Coverage is measured on both native architectures (x86_64 and aarch64) so
# the coverage recorded for a merge to main matches what the PR build recorded
# (the union of both archs). Uploading a single x86_64 report here previously
# made every merge commit look ~0.4% lower than its own PR base, failing the
# codecov/project status on identical code.
coverage:
Comment thread
fabisev marked this conversation as resolved.
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
name: "coverage (${{ matrix.arch }})"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Set up JDK 1.8
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: 8
distribution: corretto
cache: maven

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
with:
install: true

- name: Build and install core dependency locally
working-directory: ./aws-lambda-java-core
run: mvn clean install

- name: Build and install serialization dependency locally
working-directory: ./aws-lambda-java-serialization
run: mvn clean install

- name: Build Runtime Interface Client - Run 'build-${{ matrix.arch }}' target
working-directory: ./aws-lambda-java-runtime-interface-client
run: make build-${{ matrix.arch }}
env:
IS_JAVA_8: true

- name: Upload coverage to Codecov
if: env.CODECOV_TOKEN != null
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
files: ./aws-lambda-java-runtime-interface-client/target/site/jacoco/jacoco.xml
flags: ${{ matrix.arch }}
disable_search: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
4 changes: 4 additions & 0 deletions .github/workflows/runtime-interface-client_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
- name: Upload coverage to Codecov
if: env.CODECOV_TOKEN != null
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
files: ./aws-lambda-java-runtime-interface-client/target/site/jacoco/jacoco.xml
flags: ${{ matrix.arch }}
disable_search: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand Down
Loading