Skip to content

Release provider libraries #1260

Release provider libraries

Release provider libraries #1260

name: Compile, analyze, and test pulumi-kotlin
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
compile-and-test:
name: Compile and test pulumi-kotlin
runs-on: ubuntu-latest
steps:
- name: Check out project sources
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- name: Compile and test code
id: run-tests
run: ./gradlew build test -x check
- name: Upload buildSrc test report
if: ${{ failure() && steps.run-tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: build-src-test-report
path: ./buildSrc/build/reports/tests/test/*
retention-days: 3
- name: Upload test report
if: ${{ failure() && steps.run-tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: test-report
path: ./build/reports/tests/test/*
retention-days: 3
- name: Upload ejected-tests
if: ${{ failure() && steps.run-tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: ejected-tests
path: ./ejected-tests/
retention-days: 3
analyze:
name: Analyze pulumi-kotlin
runs-on: ubuntu-latest
steps:
- name: Check out project sources
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- name: Run Ktlint
id: run-ktlint
run: ./gradlew lintKotlin
- name: Upload Ktlint report
if: ${{ failure() && steps.run-ktlint.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: ktlint-report
path: ./build/reports/ktlint/*.html
retention-days: 3
- name: Run Detekt
id: run-detekt
run: ./gradlew detekt
- name: Upload Detekt report
if: ${{ failure() && steps.run-detekt.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: detekt-report
path: ./build/reports/detekt/*.html
retention-days: 3