Skip to content

Commit

Permalink
switch cypress integration testing to use gradle
Browse files Browse the repository at this point in the history
Update Github actions versions. Use Java 19.
Set max heap to 7G using dedicated parameter.
Use UI commit where 'yarn start-backend' has been changed
to use 'gradle runBackend'.
  • Loading branch information
abyrd committed Jan 13, 2023
1 parent 38fd1eb commit 6df6e6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/cypress-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,27 @@ jobs:

runs-on: ubuntu-latest
steps:
# Checkout each repo into sub-directories
- uses: actions/checkout@v2
# Checkout each the UI and R5 into separate subdirectories
- uses: actions/checkout@v3
with:
repository: conveyal/analysis-ui
ref: 1701bd9aea859a4714bc3f35f5bcf767a3256a64
ref: 6804e28bf03063d7afd169086e09f651bb9eeec0
fetch-depth: 0
path: ui
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
path: r5
# Build .jar and copy to ./ui directory (along with config file)
# Cache Gradle dependencies to speed up the shadow jar build
- uses: actions/cache@v1
id: cache
with:
path: ~/.gradle/caches
key: gradle-caches
- uses: actions/setup-java@v1
# Build R5 and check that it can start up as a backend
- uses: actions/setup-java@v3
with:
java-version: 11
- run: gradle shadowJar -x test
distribution: temurin
java-version: 19
cache: gradle
- run: |
cp analysis.properties.template analysis.properties
gradle testRunnable -x test
working-directory: r5
- run: cp $(ls ./r5/build/libs/*-all.jar | head -n1) ./ui/latest.jar
- run: cp ./r5/analysis.properties.template ./ui/analysis.properties

# Install / cache dependencies with Cypress to handle caching Cypress binary.
- uses: actions/setup-node@v2
with:
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ application {
// Run R5 as a local analysis backend with all dependencies on the classpath, without building a shadowJar.
task runBackend (type: JavaExec) {
dependsOn(build)
maxHeapSize('7G')
classpath(sourceSets.main.runtimeClasspath)
main("com.conveyal.analysis.BackendMain")
}
Expand Down

0 comments on commit 6df6e6a

Please sign in to comment.