-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding digest_unanalyzed route + debug Operation being linked to Readset when ingesting transfer and GenPipes * Using project rather than project_name or project_id in routes - test 1 * Need to convert project_id from name_to_id from list of int into str * Adding a new attribute for experiment: nucleic_acid_type * Accepting metric without flag set * Allowing job_status being null if job hasn't been submitted * Skipping null job during ingesting genpipes as we don't want files not generated * Build and push Image. Dockefile to Containerfile * Release container with latest_release tag on gitub release (#26) * Tag image on quay on releases * Update pyproject.toml to fix enum error message --------- Co-authored-by: Paul Stretenowich <paul.stretenowich@mcgill.ca>
- Loading branch information
1 parent
8127c01
commit a23d6f6
Showing
2 changed files
with
101 additions
and
69 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
REGISTRY_USER: c3genomics+github_pusher | ||
IMAGE_REGISTRY: quay.io | ||
REGISTRY_PASSWORD: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
IMAGE: c3genomics/project_tracking | ||
LATEST_RELEASE: latest_release | ||
|
||
jobs: | ||
build: | ||
name: Release image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: pull release | ||
run: | | ||
# pull taged images and set to latest release | ||
podman pull ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }}:${{ env.RELEASE_VERSION }} | ||
podman tag ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }}:${{ env.RELEASE_VERSION }} \ | ||
${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }}:${{ env.LATEST_RELEASE }} | ||
- name: Push to repo | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
image: ${{ env.IMAGE }} | ||
tags: ${{ env.LATEST_RELEASE }} | ||
- name: Print image url | ||
run: echo "Image pushed to ${{ steps.push-to-repo.outputs.registry-paths }}" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,71 @@ | ||
--- | ||
name: Tests suite | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- 'main' | ||
- 'dev' | ||
push: | ||
branches: | ||
- 'main' | ||
- 'dev' | ||
|
||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: ['main', 'dev'] | ||
push: | ||
tags: '[0-9]+.[0-9]+.[0-9]+' | ||
branches: ['main', 'dev'] | ||
|
||
env: | ||
REGISTRY_USER: c3genomics+github_pusher | ||
IMAGE_REGISTRY: quay.io | ||
REGISTRY_PASSWORD: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
IMAGE: c3genomics/project_tracking | ||
REGISTRY_USER: c3genomics+github_pusher | ||
IMAGE_REGISTRY: quay.io | ||
REGISTRY_PASSWORD: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
IMAGE: c3genomics/project_tracking | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
os: [ubuntu-latest, macos-latest] | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[tests] flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is | ||
# 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 \ | ||
--max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest -v | ||
build: | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags') | ||
name: Build image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Buildah Action | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }} | ||
tags: ${{ env.RELEASE_VERSION }} latest_release | ||
containerfiles: ./Containerfile | ||
- name: Push to repo | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
image: ${{ env.IMAGE }} | ||
tags: ${{ env.RELEASE_VERSION }} latest_release | ||
- name: Print image url | ||
run: echo "Image pushed to ${{ steps.push-to-repo.outputs.registry-paths }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[tests] flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is | ||
# 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 \ | ||
--max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest -v | ||
build: | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags') | ||
name: Build image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set tag | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Buildah Action | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }} | ||
tags: ${{ env.RELEASE_VERSION }} | ||
containerfiles: ./Containerfile | ||
- name: Push to repo | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
image: ${{ env.IMAGE }} | ||
tags: ${{ env.RELEASE_VERSION }} | ||
- name: Print image url | ||
run: echo "Image pushed to ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE }}:${{ env.RELEASE_VERSION }}" | ||
|