mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-08-22 15:15:35 +00:00
ci to run tests
This commit is contained in:
41
.circleci/config.yml
Normal file
41
.circleci/config.yml
Normal file
@ -0,0 +1,41 @@
|
||||
# CI/CD configuration file
|
||||
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
android: circleci/android@2.3.0
|
||||
|
||||
jobs:
|
||||
lint-and-test-and-build:
|
||||
executor:
|
||||
name: android/android-docker
|
||||
resource-class: large
|
||||
tag: 2023.05.1
|
||||
working_directory: ~/project/client
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# lint
|
||||
- android/restore-gradle-cache
|
||||
- run:
|
||||
name: Run linter
|
||||
command: ./gradlew lintDebug
|
||||
- android/save-gradle-cache
|
||||
|
||||
# unit tests
|
||||
- run:
|
||||
name: Unit tests
|
||||
command: ./gradlew testDebugUnitTest
|
||||
|
||||
# build it
|
||||
- android/restore-build-cache
|
||||
- run:
|
||||
name: Build
|
||||
command: ./gradlew build
|
||||
- android/save-build-cache
|
||||
|
||||
|
||||
workflows:
|
||||
build_and_test:
|
||||
jobs:
|
||||
- lint-and-test-and-build
|
@ -8,7 +8,14 @@ import org.junit.Test
|
||||
class LastTimeRingBufferTest {
|
||||
|
||||
@Test
|
||||
fun setLastTime() {
|
||||
Assert.assertEquals(true, true)
|
||||
fun `basic test of LastTimeRingBuffer`() {
|
||||
val lastTimeBuffer = LastTimeRingBuffer(10)
|
||||
assertEquals(0, lastTimeBuffer.getTimeByIndex(0))
|
||||
|
||||
lastTimeBuffer.setLastTime(2L)
|
||||
lastTimeBuffer.setLastTime(5L)
|
||||
|
||||
//assertEquals(5, lastTimeBuffer.getTimeByIndex(0))
|
||||
//assertEquals(2, lastTimeBuffer.getTimeByIndex(1))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user