Merge pull request #34 from kbaseapps/dev-fix_build_and_upgrade #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: KBase SDK Tests | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
branches: | |
- master | |
- main | |
- develop | |
jobs: | |
sdk_tests: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check out GitHub repo | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
uses: actions/checkout@v2 | |
- name: Set up test environment | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
shell: bash | |
env: | |
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | |
run: | | |
sh GHA_scripts/make_testdir && echo "Created test_local" | |
test -f "test_local/test.cfg" && echo "Confirmed config exists" | |
- name: Configure authentication | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
shell: bash | |
env: | |
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | |
run: | | |
# Add token to config | |
sed -ie "s/^test_token=.*$/&$KBASE_TEST_TOKEN/g" ./test_local/test.cfg | |
- name: Run tests | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
shell: bash | |
run: | | |
sh GHA_scripts/kb-sdk test --verbose | |
# TODO COVERAGE alter the Makefile to generate coverage info and uncomment | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# fail_ci_if_error: true |