Skip to content
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

Poetry support,fix workflows, update python #45

Merged
merged 15 commits into from
Dec 5, 2023
16 changes: 9 additions & 7 deletions .github/workflows/merge_master_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,33 @@ jobs:
name: Create staging image
steps:
- name: Check out git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"
run: echo "branch=$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")" >> $GITHUB_OUTPUT


- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
push: true
tags: "clinicalgenomics/arnold-stage:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/arnold-stage:latest"
tags: "clinicalgenomics/arnold-stage:${{steps.get_branch_name.outputs.branch}},clinicalgenomics/arnold-stage:latest"


tests-coverage:
runs-on: ubuntu-latest
Expand All @@ -56,7 +58,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"

- name: Check out cg_lims
uses: actions/checkout@v2
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/pull_request_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,48 @@ name: Pull Request Actions
on: [push]

jobs:
black-lint:
lint:
runs-on: ubuntu-latest
name: Black
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
- name: Check out git repository
uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Set up Black
uses: psf/black@stable
with:
black_args: ". --check --line-length 100"
options: ". --check --line-length 100"
version: "~=23.3.0"

docker-image-push:
runs-on: ubuntu-latest
name: Create staging docker image
steps:
- name: Check out git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"
run: echo "branch=$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")" >> $GITHUB_OUTPUT

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
Expand All @@ -53,7 +60,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.11

- name: Check out arnold
uses: actions/checkout@v2
Expand Down
40 changes: 4 additions & 36 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:

- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"
run: echo "branch=$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")" >> $GITHUB_OUTPUT

- name: Login to Docker Hub
uses: docker/login-action@v1
Expand All @@ -27,44 +26,13 @@ jobs:

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
push: true
tags: "clinicalgenomics/arnold:${{github.event.release.tag_name}}, clinicalgenomics/arnold:latest"

build-n-publish:
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install build tools
run: >-
python -m
pip install
wheel
twine
--user
- name: Build a binary wheel and a source tarball
run: >-
python
setup.py
sdist
bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
tags: "clinicalgenomics/arnold:${{github.event.release.tag_name}}, clinicalgenomics/arnold:latest"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.10-slim
FROM python:3.11-slim

LABEL base_image="python:3.10-slim"
LABEL base_image="python:3.11-slim"
LABEL about.home="https://github.com/Clinical-Genomics/arnold"
LABEL about.tags="CG Core database and API"

Expand Down
Loading
Loading