Skip to content
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

V1 cleanup remove lang #1

Draft
wants to merge 6 commits into
base: v1
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 52 additions & 9 deletions .github/workflows/conformance-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Conformance Test Report Generation
on: [push, pull_request]

env:
CONFORMANCE_REPORT_NAME: conformance_test_results.ion
PATH_TO_TEST_RUNNER: test/partiql-tests-runner
CONFORMANCE_REPORT_RELATIVE_PATH: build/conformance-test-report
COMPARISON_REPORT_NAME: comparison_report.md
Expand Down Expand Up @@ -35,7 +36,7 @@ jobs:
- name: Upload `conformance-test-report` folder
uses: actions/upload-artifact@v3
with:
path: ${{ env.PATH_TO_TEST_RUNNER }}/build/conformance-test-report
path: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.CONFORMANCE_REPORT_RELATIVE_PATH }}
# Cache the conformance report for `conformance-report-comparison` job (pull_request event only)
- name: Cache conformance report and build
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -96,12 +97,32 @@ jobs:
run: |
mkdir -p $GITHUB_WORKSPACE/artifact
cp -r $GITHUB_WORKSPACE/${{ github.event.pull_request.base.sha }}/$PATH_TO_TEST_RUNNER/$CONFORMANCE_REPORT_RELATIVE_PATH $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_RELATIVE_PATH
# Run conformance report comparison. Generates `comparison_report.md`
- name: Run conformance report comparison for artifact. Generates `comparison_report.md`
# Run conformance report comparison (cross-engine). Generates `comparison_report.md`
- name: Run cross-engine conformance report comparison for artifact. Generates `comparison_report.md`
continue-on-error: true
run: |
ARGS="$GITHUB_WORKSPACE/artifact $CONFORMANCE_REPORT_RELATIVE_PATH ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME"
gradle :test:partiql-tests-runner:run --args="$ARGS"
gradle :test:partiql-tests-runner:run \
-t "CROSS-ENGINE Comparison Report" \
-bf $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_RELATIVE_PATH/legacy/$CONFORMANCE_REPORT_NAME \
-bl LEGACY \
-bt ${{ github.event.pull_request.base.sha }} \
-tf $CONFORMANCE_REPORT_RELATIVE_PATH/eval/CONFORMANCE_REPORT_NAME \
-tl EVAL \
-tt $GITHUB_SHA \
-o $COMPARISON_REPORT_NAME
# Run conformance report comparison (cross-commit). Generates `comparison_report.md`
- name: Run cross-commit conformance report comparison for artifact. Generates `comparison_report.md`
continue-on-error: true
run: |
gradle :test:partiql-tests-runner:run \
-t "CROSS-COMMIT Comparison Report" \
-bf $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_RELATIVE_PATH/eval/$CONFORMANCE_REPORT_NAME \
-bl EVAL \
-bt ${{ github.event.pull_request.base.sha }} \
-tf $CONFORMANCE_REPORT_RELATIVE_PATH/eval/CONFORMANCE_REPORT_NAME \
-tl EVAL \
-tt $GITHUB_SHA \
-o $COMPARISON_REPORT_NAME
# Print conformance report to GitHub actions workflow summary page
- name: Print markdown in run
continue-on-error: true
Expand All @@ -111,12 +132,34 @@ jobs:
uses: actions/upload-artifact@v3
with:
path: ${{ env.PATH_TO_TEST_RUNNER }}/comparison_report.md
# Rebuild the test report with a size limit for comment
- name: Run conformance report comparison for comment. Generates `comparison_report_limited.md`
# Rebuild the test report (cross-engine) with a size limit for comment
- name: Run cross-engine conformance report comparison for comment. Generates `comparison_report_limited.md`
continue-on-error: true
run: |
gradle :test:partiql-tests-runner:run \
-t "CROSS-ENGINE Conformance Report" \
-bf $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_RELATIVE_PATH/legacy/$CONFORMANCE_REPORT_NAME \
-bl LEGACY \
-bt ${{ github.event.pull_request.base.sha }} \
-tf $CONFORMANCE_REPORT_RELATIVE_PATH/eval/$CONFORMANCE_REPORT_NAME \
-tl EVAL \
-tt $GITHUB_SHA \
-o $COMPARISON_REPORT_NAME_WITH_LIMIT \
-l $COMMENT_SIZE_LIMIT
# Rebuild the test report (cross-commit) with a size limit for comment
- name: Run cross-commit conformance report comparison for comment. Generates `comparison_report_limited.md`
continue-on-error: true
run: |
ARGS="$GITHUB_WORKSPACE/artifact $CONFORMANCE_REPORT_RELATIVE_PATH ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME_WITH_LIMIT $COMMENT_SIZE_LIMIT"
gradle :test:partiql-tests-runner:run --args="$ARGS"
gradle :test:partiql-tests-runner:run \
-t "CROSS-COMMIT Conformance Report" \
-bf $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_RELATIVE_PATH/eval/$CONFORMANCE_REPORT_NAME \
-bl EVAL \
-bt ${{ github.event.pull_request.base.sha }} \
-tf $CONFORMANCE_REPORT_RELATIVE_PATH/eval/$CONFORMANCE_REPORT_NAME \
-tl EVAL \
-tt $GITHUB_SHA \
-o $COMPARISON_REPORT_NAME_WITH_LIMIT \
-l $COMMENT_SIZE_LIMIT
# Find comment w/ conformance comparison if previous comment published
- name: Find Comment
uses: peter-evans/find-comment@v2
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/partiql.versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ object Versions {
const val picoCli = "4.7.0"
const val kasechange = "1.3.0"
const val pig = "0.6.2"
const val shadow = "8.1.1"
const val kotlinxCoroutines = "1.6.0"
const val kotlinxCoroutinesJdk8 = "1.6.0"
const val ktlint = "0.42.1" // we're on an old version of ktlint. TODO upgrade https://github.com/partiql/partiql-lang-kotlin/issues/1418
Expand Down Expand Up @@ -123,5 +124,6 @@ object Plugins {
const val dokka = "org.jetbrains.dokka"
const val jmh = "me.champeau.jmh"
const val library = "org.gradle.java-library"
const val shadow = "com.github.johnrengelman.shadow"
const val testFixtures = "org.gradle.java-test-fixtures"
}
2 changes: 1 addition & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ application {
}

dependencies {
implementation(project(":partiql-lang"))
implementation("org.partiql:partiql-lang-kotlin:0.14.8")
implementation(Deps.kotlinxCoroutines)
implementation(Deps.kotlinxCoroutinesJdk8)
implementation(Deps.awsSdkS3)
Expand Down
41 changes: 23 additions & 18 deletions partiql-coverage/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,41 @@ plugins {
id(Plugins.conventions)
id(Plugins.dokka)
id(Plugins.library)
id(Plugins.publish)
// TODO: Once code coverage is supported with the new evaluator, we can publish a new version.
// id(Plugins.publish)
}

dependencies {
api(project(":partiql-lang"))
// TODO: Once code coverage is published again, we can re-add the HEAD of the PartiQL Library.
api("org.partiql:partiql-lang-kotlin:0.14.8")
implementation(Deps.junitApi)
implementation(Deps.junitParams)
implementation(Deps.junitPlatformLauncher)
implementation(Deps.jgenhtml)
}

tasks.shadowJar {
configurations = listOf(project.configurations.shadow.get())
}

// Workaround for https://github.com/johnrengelman/shadow/issues/651
components.withType(AdhocComponentWithVariants::class.java).forEach { c ->
c.withVariantsFromConfiguration(project.configurations.shadowRuntimeElements.get()) {
skip()
}
}

// Need to add this as we have both Java and Kotlin sources. Dokka already handles multi-language projects. If
// Javadoc is enabled, we end up overwriting index.html (causing compilation errors).
tasks.withType<Javadoc>() {
enabled = false
}

publish {
artifactId = "partiql-coverage"
name = "PartiQL Code Coverage"
description = "Code Coverage APIs for testing PartiQL source."
}
// START OF COMMENTED OUT CODE
// TODO: This has all be commented out due to the *temporary* removal of the publish API

// tasks.shadowJar {
// configurations = listOf(project.configurations.shadow.get())
// }

// Workaround for https://github.com/johnrengelman/shadow/issues/651
// components.withType(AdhocComponentWithVariants::class.java).forEach { c ->
// c.withVariantsFromConfiguration(project.configurations.shadowRuntimeElements.get()) {
// skip()
// }
// }
// publish {
// artifactId = "partiql-coverage"
// name = "PartiQL Code Coverage"
// description = "Code Coverage APIs for testing PartiQL source."
// }
// END OF COMMENTED OUT CODE
1 change: 0 additions & 1 deletion partiql-eval/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dependencies {
testImplementation(project(":plugins:partiql-local"))
testImplementation(project(":plugins:partiql-memory"))
testImplementation(testFixtures(project(":partiql-planner")))
testImplementation(testFixtures(project(":partiql-lang")))
testImplementation(Deps.junit4)
testImplementation(Deps.junit4Params)
testImplementation(Deps.junitVintage) // Enables JUnit4
Expand Down
Loading
Loading