Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
name: KBase SDK Tests

on: [push, pull_request]
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
- develop

jobs:

sdk_tests:
runs-on: ubuntu-latest
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: Check out Actions CI files
if: "!contains(github.event.head_commit.message, 'skip ci')"
uses: actions/checkout@v2
with:
repository: 'kbaseapps/kb_sdk_actions'
path: 'kb_sdk_actions'


- name: Set up test environment
if: "!contains(github.event.head_commit.message, 'skip ci')"
shell: bash
env:
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN}}
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }}
run: |
# Verify kb_sdk_actions clone worked
test -f "$HOME/kb_sdk_actions/bin/kb-sdk" && echo "CI files cloned"
# Pull kb-sdk & create startup script
docker pull kbase/kb-sdk
sh $GITHUB_WORKSPACE/kb_sdk_actions/bin/make_testdir && echo "Created test_local"
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}}
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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
sh $GITHUB_WORKSPACE/kb_sdk_actions/bin/kb-sdk test
bash <(curl -s https://codecov.io/bash)
sh GHA_scripts/kb-sdk test --verbose

# TODO CODECOV failing for some reason, fix later
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true

12 changes: 12 additions & 0 deletions GHA_scripts/kb-sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# TODO may want to make the image an env var or argument

# See https://github.com/kbaseapps/kb_sdk_actions/blob/master/bin/kb-sdk for source

# Cache the group for the docker file
if [ ! -e $HOME/.kbsdk.cache ] ; then
docker run -i -v /var/run/docker.sock:/var/run/docker.sock --entrypoint ls ghcr.io/kbase/kb_sdk_patch-develop:br-0.0.4 -l /var/run/docker.sock|awk '{print $4}' > $HOME/.kbsdk.cache
fi

exec docker run -i --rm -v $HOME:$HOME -w $(pwd) -v /var/run/docker.sock:/var/run/docker.sock -e DSHELL=$SHELL --group-add $(cat $HOME/.kbsdk.cache) ghcr.io/kbase/kb_sdk_patch-develop:br-0.0.4 $@
16 changes: 16 additions & 0 deletions GHA_scripts/make_testdir
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

# TODO may want to make the image an env var or argument

# See https://github.com/kbaseapps/kb_sdk_actions/blob/master/bin/make_testdir for source

# Disable the default `return 1` when creating `test_local`
set +e

# Cache the group for the docker file
if [ ! -e $HOME/.kbsdk.cache ] ; then
docker run -i -v /var/run/docker.sock:/var/run/docker.sock --entrypoint ls ghcr.io/kbase/kb_sdk_patch-develop:br-0.0.4 -l /var/run/docker.sock|awk '{print $4}' > $HOME/.kbsdk.cache
fi

exec docker run -i --rm -v $HOME:$HOME -u $(id -u) -w $(pwd) -v /var/run/docker.sock:/var/run/docker.sock -e DUSER=$USER -e DSHELL=$SHELL --group-add $(cat $HOME/.kbsdk.cache) ghcr.io/kbase/kb_sdk_patch-develop:br-0.0.4 test
exit
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
KBaseReport Release Notes
=========================

3.2.2
-----
- Rebuilt with no changes to update from deprecated Docker image/manifest format.

3.2.1
-----
- Fixed unittests which failed because of empty a.txt and b.txt file
Expand Down
4 changes: 2 additions & 2 deletions kbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ service-language:
python

module-version:
3.2.1
3.2.2

owners:
[jayrbolton, ialarmedalien]
[ialarmedalien, gaprice]