-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.36 KB
/
test.yml
File metadata and controls
63 lines (51 loc) · 1.36 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
name: KBase SDK Plus tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
# run workflow when merging to main or develop
branches:
- main
- master
- develop
jobs:
kb_sdk_plus_tests:
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- java-version: "17"
steps:
- name: Repo checkout
uses: actions/checkout@v4
- name: Set up java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{matrix.java-version}}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies and set up test config
shell: bash
env:
KBASE_CI_TOKEN: ${{ secrets.KBASE_CI_TOKEN }}
KBASE_CI_TOKEN2: ${{ secrets.KBASE_CI_TOKEN2 }}
run: |
# set up python dependencies
uv sync --locked
# set up test config
cp test.cfg.example test.cfg
sed -i "s#^test.token=.*#test.token=$KBASE_CI_TOKEN#" test.cfg
sed -i "s#^test.token2=.*#test.token2=$KBASE_CI_TOKEN2#" test.cfg
- name: Run tests
shell: bash
run: uv run ./gradlew test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true