58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: fkirc/skip-duplicate-actions@master
|
|
- uses: actions/checkout@v2
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
|
|
- name: Unit tests
|
|
run: |
|
|
./gradlew test --stacktrace
|
|
./gradlew jacocoTestReport --stacktrace
|
|
- name: API changes check
|
|
run: |
|
|
./gradlew :sdk:apiCheck --stacktrace
|
|
./gradlew :sdk-scrapper:apiCheck --stacktrace
|
|
- uses: codecov/codecov-action@v1
|
|
|
|
lint:
|
|
name: Lint check
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: fkirc/skip-duplicate-actions@master
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
|
|
- name: Lint
|
|
run: |
|
|
./gradlew ktlintCheck --stacktrace
|
|
- uses: codecov/codecov-action@v1
|