Skip to content

Commit

Permalink
Merge branch 'dev' into dump_yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Jan 10, 2024
2 parents ffab17b + 6493043 commit 3a76d36
Show file tree
Hide file tree
Showing 28 changed files with 937 additions and 271 deletions.
69 changes: 53 additions & 16 deletions .github/workflows/e2e-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,27 @@ run-name: Create all entities in Seqera Platform from end-to-end with seqerakit
# It will automate the end-to-end creation all of the following entities in Seqera Platform.

on:
pull_request_target:
branches: [main]
workflow_dispatch:
inputs:
pre_delete:
description: 'Delete all entities in the yaml before testing'
required: false
type: boolean
default: false
clearup:
description: 'Clearup all entities in yaml after testing'
required: false
type: boolean
default: true

jobs:
e2e-testing:
name:
if: github.repository == 'seqeralabs/seqera-kit'
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}

env:
TOWER_ACCESS_TOKEN: ${{ secrets.TOWER_ACCESS_TOKEN }}
TOWER_GITHUB_PASSWORD: ${{ secrets.TOWER_GITHUB_PASSWORD }}
Expand All @@ -25,31 +36,57 @@ jobs:
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }}

steps:
- name: Check out source-code repository
uses: actions/checkout@v3

- name: Setup conda
uses: conda-incubator/setup-miniconda@v2.2.0
- name: Setup Python
uses: actions/setup-python@v2
with:
auto-update-conda: true
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: '3.10'
activate-environment: seqerakit
use-mamba: true
python-version: '3.12'

- name: Install pip & seqerakit
run: |
mamba install -y -c conda-forge pip
pip install -e .
- name: Create all entities on Seqera Platform from end-to-end
- name: Install Tower CLI v0.9.1
run: |
wget https://github.com/seqeralabs/tower-cli/releases/download/v0.9.1/tw-linux-x86_64 \
&& chmod +x tw-linux-x86_64 \
&& sudo mv tw-linux-x86_64 /usr/local/bin/tw
- name: pre-clear
# Note this task always 'succeeds'
if: ( success() || failure() ) && ( github.event_name != 'workflow_dispatch' || inputs.pre_delete )
run: |
temp_file=$(mktemp -q)
echo $GOOGLE_KEY | base64 -d > $temp_file
export GOOGLE_KEY=$temp_file
seqerakit examples/yaml/e2e/*.yml --delete || true
- name: dryrun
run: |
temp_file=$(mktemp -q)
echo $GOOGLE_KEY | base64 -d > $temp_file
export GOOGLE_KEY=$temp_file
seqerakit examples/yaml/e2e/*.yml --dryrun
- name: create
run: |
temp_file=$(mktemp -q)
echo $GOOGLE_KEY | base64 -d > $temp_file
export GOOGLE_KEY=$temp_file
seqerakit examples/yaml/e2e/*.yml
- name: teardown
if: ( success() || failure() ) && ( github.event_name != 'workflow_dispatch' || inputs.clearup )
run: |
mamba init
temp_file=$(mktemp -q)
echo $GOOGLE_KEY | base64 -d > $temp_file
export GOOGLE_KEY=$temp_file
seqerakit examples/yaml/seqerakit-e2e.yml
seqerakit examples/yaml/e2e/*.yml --delete
49 changes: 0 additions & 49 deletions .github/workflows/overwrite-testing.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pytest
pip install pytest-mock
pip install -e .
- name: Run tests
run: |
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/teardown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: teardown
run-name: Destroy all entities in Seqera Platform from end-to-end with seqerakit
# This workflow can be triggered manually with GitHub actions workflow dispatch button.
# It will automate removing the e2e testing workspace.

on:
workflow_dispatch:
jobs:
e2e-testing:
name:
if: github.repository == 'seqeralabs/seqera-kit'
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
env:
TOWER_ACCESS_TOKEN: ${{ secrets.TOWER_ACCESS_TOKEN }}
TOWER_GITHUB_PASSWORD: ${{ secrets.TOWER_GITHUB_PASSWORD }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ASSUME_ROLE_ARN: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
AZURE_BATCH_KEY: ${{ secrets.AZURE_BATCH_KEY }}
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }}

steps:
- name: Check out source-code repository
uses: actions/checkout@v3

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: environment.yml
python-version: '3.12'
mamba-version: '*'
channels: conda-forge,bioconda,defaults
activate-environment: seqerakit
use-mamba: true

- name: Install pip & seqerakit
run: |
pip install -e .
- name: teardown
run: |
mamba init
temp_file=$(mktemp -q)
echo $GOOGLE_KEY | base64 -d > $temp_file
export GOOGLE_KEY=$temp_file
seqerakit --delete examples/yaml/seqerakit-e2e.yml
Loading

0 comments on commit 3a76d36

Please sign in to comment.