Skip to content

Merge pull request #15 from kbase/dev-new_client #36

Merge pull request #15 from kbase/dev-new_client

Merge pull request #15 from kbase/dev-new_client #36

Workflow file for this run

name: KBase Auth2 Client tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
# run workflow when merging to main or develop
branches:
- main
- develop
jobs:
auth2_java_client_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- java: '8'
- java: '11'
steps:
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: Run tests
env:
KBASE_CI_TOKEN: ${{ secrets.KBASE_CI_TOKEN }}
KBASE_CI_TOKEN2: ${{ secrets.KBASE_CI_TOKEN2 }}
run: |
cp test.cfg.example test.cfg
sed -i "s#^auth_token1 =.*#auth_token1 = $KBASE_CI_TOKEN#" test.cfg
sed -i "s#^auth_token2 =.*#auth_token2 = $KBASE_CI_TOKEN2#" test.cfg
sed -i "s#^auth_user1 =.*#auth_user1 = kbase_bot#" test.cfg
sed -i "s#^auth_user2 =.*#auth_user2 = sychan168#" test.cfg
sed -i "s#^good_users =.*#good_users = kbasetest2 , kbasetest7 , kbasehelp#" test.cfg
./gradlew test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true