refactor!: rename metrics and remove redundant metrics #2288
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed | |
concurrency: | |
group: ci-pr-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUN: ${{ github.run_id }}-${{ github.run_number }} | |
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
jobs: | |
jvm: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# we build with a specific JDK version but source/target compatibility should ensure the jar is usable by | |
# the target versions we want to support | |
java-version: | |
- 8 | |
- 11 | |
- 17 | |
- 21 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Configure JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Test | |
shell: bash | |
run: | | |
./gradlew -Ptest.java.version=${{ matrix.java-version }} jvmTest --stacktrace | |
all-platforms: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Configure JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Test | |
shell: bash | |
run: | | |
echo "kotlinWarningsAsErrors=true" >> $GITHUB_WORKSPACE/local.properties | |
./gradlew apiCheck | |
./gradlew test allTests | |
- name: Save Test Reports | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-reports | |
path: '**/build/reports' | |
downstream: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
path: 'smithy-kotlin' | |
- name: Checkout tools | |
uses: actions/checkout@v4 | |
with: | |
path: 'aws-kotlin-repo-tools' | |
repository: 'awslabs/aws-kotlin-repo-tools' | |
ref: '0.2.3' | |
sparse-checkout: | | |
.github | |
- name: Checkout aws-sdk-kotlin | |
uses: ./aws-kotlin-repo-tools/.github/actions/checkout-head | |
with: | |
# smithy-kotlin is checked out as a sibling dir which will automatically make it an included build | |
path: 'aws-sdk-kotlin' | |
repository: 'awslabs/aws-sdk-kotlin' | |
- name: Configure JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Build and Test aws-sdk-kotlin downstream | |
run: | | |
# TODO - JVM only | |
cd $GITHUB_WORKSPACE/smithy-kotlin | |
./gradlew --parallel publishToMavenLocal | |
cd $GITHUB_WORKSPACE/aws-sdk-kotlin | |
./gradlew --parallel publishToMavenLocal | |
./gradlew testAllProtocols |