forked from Unleash/unleash
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Travis.yml for CI integration.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Specify the Travis CI build environment | ||
dist: focal # Ubuntu 20.04 LTS | ||
|
||
# Define the programming languages/environments | ||
language: java | ||
|
||
# Use JDK 11 for Java builds, which is commonly used for compatibility with modern libraries | ||
jdk: | ||
- openjdk11 | ||
|
||
# Define Node.js versions for the Node.js/Yarn tasks | ||
node_js: | ||
- 18.17.1 | ||
|
||
# Cache dependencies for faster builds | ||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/ | ||
- $HOME/.gradle/wrapper/ | ||
- $HOME/.npm | ||
- $HOME/.yarn-cache | ||
|
||
# Install Yarn globally and ensure Gradle is set up | ||
before_install: | ||
- npm install -g yarn # Install Yarn globally | ||
- curl -sLo gradle.zip https://services.gradle.org/distributions/gradle-7.6-bin.zip && unzip gradle.zip -d /tmp && export GRADLE_HOME=/tmp/gradle-7.6 && export PATH=$GRADLE_HOME/bin:$PATH # Install Gradle | ||
|
||
# Install dependencies using Yarn | ||
install: | ||
- yarn install # Install Node.js dependencies | ||
- ./gradlew installDependencies # Install Gradle dependencies and Node.js packages | ||
|
||
# Define the build script steps | ||
script: | ||
- ./gradlew buildTypeScript # Build TypeScript files | ||
- ./gradlew test # Run Java and TypeScript tests | ||
|
||
# After the tests, generate JaCoCo coverage reports and submit them | ||
after_success: | ||
- ./gradlew jacocoTestReport # Generate code coverage report | ||
# Optionally, integrate with Coveralls (if you have Coveralls set up) | ||
# - bash <(curl -s https://codecov.io/bash) # Send the report to Codecov |