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
67 changes: 46 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
Expand All @@ -18,52 +17,78 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.14']

python-version: ['3.9', '3.12']
steps:
- uses: actions/checkout@v6

- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y poppler-utils

- name: Upgrade pip, setuptools, and packaging
run: |
python -m pip install --upgrade pip setuptools packaging

- name: Cache src directory
uses: actions/cache@v5
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/src/
path: ./src/
key: ${{ runner.os }}-src-grch37
restore-keys: |
${{ runner.os }}-src-

- name: Download GRCh37.tar.gz if not present
run: |
if [ ! -f ${{ github.workspace }}/src/GRCh37.tar.gz ]; then
wget --connect-timeout=10 --tries=20 ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerMatrixGenerator/GRCh37.tar.gz -P ${{ github.workspace }}/src/
if [ ! -f ./src/GRCh37.tar.gz ]; then
wget --connect-timeout=10 --tries=20 ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerMatrixGenerator/GRCh37.tar.gz -P ./src/
fi

- name: Install package with tests
run: |
pip install .[tests]

- name: Install genome
run: |
SigProfilerMatrixGenerator install GRCh37 --local_genome ${{ github.workspace }}/src/

python install_genome.py ${{ github.workspace }}/src/
- name: Run unit tests
run: |
pip install pytest
pytest -s -rw tests

pytest tests

- name: Run integration test
run: |
python3 test.py

- name: Build and push Docker image
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.python-version == '3.12'
run: |
echo "Starting Docker deployment to GHCR for sigprofilersuite..."

VERSION_TAG=$(grep "VERSION = " setup.py | cut -d'"' -f2)

# Get the repository name and convert it to lowercase
REPO_NAME=$(basename ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
IMAGE_NAME="ghcr.io/sigprofilersuite/$REPO_NAME"

echo "Building version: $VERSION_TAG for image: $IMAGE_NAME"

echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
--username "${{ github.actor }}" \
--password-stdin

docker build \
--build-arg COMMIT_SHA=${{ github.sha }} \
-t $IMAGE_NAME:$VERSION_TAG \
-t $IMAGE_NAME:latest .

docker push $IMAGE_NAME:$VERSION_TAG
docker push $IMAGE_NAME:latest

echo "Docker deployment to GHCR successful"
55 changes: 0 additions & 55 deletions .github/workflows/docs.yml

This file was deleted.

169 changes: 0 additions & 169 deletions .github/workflows/release.yml

This file was deleted.

Loading
Loading