-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop->Main #129
base: master
Are you sure you want to change the base?
Develop->Main #129
Conversation
bio-boris
commented
Oct 8, 2022
- Add GHCR.io
- Temporarily Add Logging
Draft: Add logs to help with debugging
Remove logging
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: '3.7' | ||
mongo-version: '3.6' | ||
# - python-version: '3.7' | ||
# mongo-version: '7.0.4' | ||
services: | ||
mongo: | ||
image: mongo:${{matrix.mongo-version}} | ||
ports: | ||
- 27017:27017 | ||
options: --name mongo${{matrix.mongo-version}} | ||
|
||
steps: | ||
- name: Repo checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
|
||
- name: Install dependencies and set up test config | ||
shell: bash | ||
env: | ||
KBASE_CI_TOKEN: ${{ secrets.KBASE_CI_TOKEN }} | ||
ADMIN_USER: ${{ secrets.KBASE_BOT_USER_CI }} | ||
|
||
run: | | ||
|
||
# test mongo connection | ||
curl http://localhost:27017 | ||
returncode=$? | ||
if [ $returncode != 0 ]; then exit $returncode; fi | ||
|
||
# set HOMEDIR | ||
export HOMEDIR=`pwd` | ||
|
||
# move to parent dir to install binaries etc | ||
cd .. | ||
|
||
# setup kb-sdk | ||
mkdir -p $(pwd)/bin | ||
docker run ghcr.io/kbase/kb_sdk_patch-develop:br-0.0.4 genscript > $(pwd)/bin/kb-sdk | ||
chmod 755 $(pwd)/bin/kb-sdk | ||
export PATH=$(pwd)/bin:$PATH | ||
|
||
# install catalog dependencies | ||
cd $HOMEDIR | ||
pip install -r requirements.txt | ||
|
||
# setup test config | ||
cp -n test/test.cfg.example test/test.cfg | ||
sed -i "s#^nms-admin-token.*#nms-admin-token=$KBASE_CI_TOKEN#" test/test.cfg | ||
sed -i "s#^method-spec-admin-users.*#method-spec-admin-users=$ADMIN_USER#" test/test.cfg | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: make test | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test