-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (39 loc) · 1.35 KB
/
main.yml
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
name: openai-for-java
on:
push:
branches: [main]
env:
OPEN_AI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
OPEN_AI_ORGANIZATION: ${{ secrets.OPEN_AI_ORGANIZATION }}
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.JIRA_PASSWORD }}
jobs:
build:
runs-on: ubuntu-latest
environment: openai-for-java
steps:
- uses: actions/checkout@v3.3.0
- name: Set up JDK 11
uses: actions/setup-java@v3.10.0
with:
java-version: 11
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew check -Dopen.ai.api.key=${{ env.OPEN_AI_API_KEY }} -Dopen.ai.organization=${{ env.OPEN_AI_ORGANIZATION }} -Djira.username=${{ env.JIRA_USERNAME }} -Djira.password=${{ env.JIRA_PASSWORD }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true
- name: Handle Codecov actions
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
output: file
file: build/reports/jacoco/test/jacocoTestReport.xml
config: ./codecov.yml
continue-on-error: true