Skip to content

Commit

Permalink
Added Travis.yml for CI integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
FKJ-ut committed Sep 5, 2024
1 parent 8ac249a commit 331ba9f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .travis.yml
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

0 comments on commit 331ba9f

Please sign in to comment.