Bump pytest-cov from 5.0.0 to 6.0.0 #31
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: | |
pull_request: | |
jobs: | |
sdk_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out GitHub repo | |
uses: actions/checkout@master | |
- name: Set up test environment | |
shell: bash | |
run: | | |
# 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-rc-1 -l /var/run/docker.sock|awk '{print $4}' > $HOME/.kbsdk.cache | |
fi | |
# ignore the exit code | |
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-rc-1 test || true | |
- name: Confirm config exists and add token | |
shell: bash | |
env: | |
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }} | |
run: | | |
test -f "test_local/test.cfg" && echo "Confirmed config exists" | |
# Add token to config | |
sed -ie "s/^test_token=.*$/&$KBASE_TEST_TOKEN/g" ./test_local/test.cfg | |
- name: Run tests | |
shell: bash | |
run: | | |
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-rc-1 test --verbose | |
- name: Upload coverage to Codecov | |
id: send_to_codecov | |
uses: codecov/codecov-action@main | |
continue-on-error: true | |
with: | |
files: ./python-coverage/coverage.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |