Skip to content

GHA: test site build #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 13 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ jobs:
with:
gradle-home-cache-cleanup: true

- name: Cache NPM
uses: actions/cache@v3
env:
cache-name: cache-npm
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
path: |
./site/node_modules
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: docusaurus build
run: ./gradlew docusaurusBuild

Expand Down
61 changes: 37 additions & 24 deletions .github/workflows/gradle_task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,40 @@ jobs:
name: "./gradlew ${{ inputs.gradle-task}} @ ${{ inputs.runs-on }}"
timeout-minutes: 60
steps:
- name: Checkout the repo
uses: actions/checkout@v3

- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Run ${{ inputs.gradle-task }}
run: >-
./gradlew ${{ inputs.gradle-task }}

- name: Upload build reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: build-report-${{ runner.os }}-${{ github.action }}
path: "**/build/reports/"
if-no-files-found: ignore
- name: Checkout the repo
uses: actions/checkout@v3

- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Cache NPM
uses: actions/cache@v3
env:
cache-name: cache-npm
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
path: |
./site/node_modules
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Run ${{ inputs.gradle-task }}
run: >-
./gradlew ${{ inputs.gradle-task }}

- name: Upload build reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: build-report-${{ runner.os }}-${{ github.action }}
path: "**/build/reports/"
if-no-files-found: ignore
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ jobs:
runs-on: ${{ matrix.os }}
gradle-task: >-
check -Pkxstsgen_enableTsCompileTests=true --stacktrace

build-site:
uses: ./.github/workflows/gradle_task.yml
with:
runs-on: ubuntu-latest
gradle-task: docusaurusBuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package buildsrc.convention

import buildsrc.config.relocateKotlinJsStore
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget


Expand All @@ -23,8 +22,6 @@ extensions.configure<KotlinMultiplatformExtension> {
languageVersion = "1.7"
apiVersion = "1.7"
}
if (this is KotlinJvmCompilation) {
}
}
}

Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ include(
)

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")

dependencyResolutionManagement {
@Suppress("UnstableApiUsage") // Central declaration of repositories is an incubating feature
Expand Down