Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

feat: e2e test, build: update tools cicd #4

feat: e2e test, build: update tools cicd

feat: e2e test, build: update tools cicd #4

Workflow file for this run

name: Uni-Dock Tools CI/CD
on:
push:
branches: []
pull_request:
branches: [ main ]
env:
BASE_IMAGE_VERSION: "0.0.1"
PYTHON_VERSION: "3.11"
jobs:
flake8:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: $PYTHON_VERSION
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8 formating
run: |
flake8 unidock_tools/unidock_tools --exit-zero
pyright:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: $PYTHON_VERSION
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyright
- name: Run pyright check
id: pyright_check
working-directory: ./unidock_tools
run: |
pyright
tests:
if: ${{ always() }}
needs: [flake8,pyright]
runs-on: nvidia
strategy:
matrix:
cuda-version: ["12.0.0"]
container:
image: docker.io/xmyyn/unidock_tools_base:$BASE_IMAGE_VERSION_cuda${{ matrix.cuda-version }}
options: --gpus all
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: install unidock
working-directory: ./unidock
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake --install .
cd ..
-name: check env
run: |

Check failure on line 80 in .github/workflows/ci_tools.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci_tools.yml

Invalid workflow file

You have an error in your yaml syntax on line 80
unidock --version
confgen --version
which python
- name: install tools
working-directory: ./unidock_tools
run: |
pip install .
- name: run unit-test
run: |
pip install pytest pytest-cov
pytest unidock_tools/tests/ut -vv --cov --cov-report term
- name: run application e2e test
run: |
pytest unidock_tools/tests/applications -vv --cov --cov-report term
build_docker_image:
needs: tests
runs-on: ubuntu-latest
strategy:
matrix:
cuda-version: ["12.0.0"]
steps:
- name: log in to docker hub
uses: docker/login-action@v3
if: github.event_name == 'push'
with:
username: dptechnology
password: ${{ secrets.DOCKERHUB_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: check commit short sha
run: echo ${{ steps.short-sha.outputs.sha }}
- name: build and push container
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
build-args: BASE_IMAGE=xmyyn/unidock_tools_base:$BASE_IMAGE_VERSION_cuda${{ matrix.cuda-version }}
tags: dptechnology/unidock_tools:${{ steps.short-sha.outputs.sha }},dptechnology/unidock_tools:latest
file: unidock_tools/containers/Dockerfile
push: ${{ github.event_name == 'push' }}