-
Notifications
You must be signed in to change notification settings - Fork 7.6k
95 lines (88 loc) · 3.73 KB
/
gradle_snapshot.yml
File metadata and controls
95 lines (88 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Snapshot
on:
push:
branches: [ '4.x' ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'ReactiveX/RxJava'
env:
# ------------------------------------------------------------------------------
CI_BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 26
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: '26'
- name: Cache Gradle packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Validity Tests Upfront
run: ./gradlew test --tests "io.reactivex.rxjava4.validators.*" --stacktrace --no-daemon
- name: Build RxJava
run: ./gradlew build --stacktrace --no-daemon
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2.23.0
if: always() # important: run even if tests failed
with:
files: |
**/build/test-results/**/TEST-*.xml
**/build/test-results/**/*.xml
**/build/test-results/testNG/TEST-*.xml
check_run: false
comment_mode: failures
fail_on: test failures
check_name: "🧪 RxJava Test Results"
report_individual_runs: true
- name: Upload to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
prerelease:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
env:
CI_BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 26
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'zulu'
java-version: '26'
- name: Cache Gradle packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for push
run: chmod +x push_javadoc.sh
- name: Upload Snapshot
run: ./gradlew -PreleaseMode=branch publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel --stacktrace
env:
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
# ------------------------------------------------------------------------------
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Push Javadoc
run: ./push_javadoc.sh
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
# ------------------------------------------------------------------------------
env:
JAVADOCS_TOKEN: ${{ secrets.JAVADOCS_TOKEN }}