Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Feb 22, 2021
2 parents f9b8294 + f30964b commit ea998f2
Show file tree
Hide file tree
Showing 48 changed files with 53,595 additions and 10,913 deletions.
1 change: 1 addition & 0 deletions .github/markdown_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ no-duplicate-header:
no-trailing-spaces:
br_spaces: 2
no-inline-html: false
no-bare-urls: false
5 changes: 4 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
push:
branches:
- master
- dev
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
paths:
- '.github/workflows/docker.yaml'
- 'workflow/envs/merge/environment.yaml'
Expand Down Expand Up @@ -62,7 +65,7 @@ jobs:
- name: docker build
if: ${{ github.event_name == 'release' }}
run: |
cd workflow/envs/main/;
cd workflow/envs/merge/;
docker build --no-cache . -t ktmeaton/plague-phylogeography:${{ github.event.release.tag_name }};
#------------------------------------------------------------------------#
- name: docker push
Expand Down
77 changes: 39 additions & 38 deletions .github/workflows/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name: Install
on:
push:
branches:
- '*'
- master
- dev
paths:
- '.github/workflows/install.yaml'
- 'workflow/Snakefile'
Expand Down Expand Up @@ -59,43 +60,43 @@ jobs:
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
#----------------------------------------------------------------------------#
install_singularity:
name: Install with Singularity
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
#------------------------------------------------------------------------#
- name: setup environment variables
run: |
echo "SINGULARITY_DOCKER_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> $GITHUB_ENV
echo "SINGULARITY_DOCKER_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }}" >> $GITHUB_ENV
echo "FLOWDASH_BIO_USERNAME=${{ secrets.FLOWDASH_BIO_USERNAME }}" >> $GITHUB_ENV
echo "FLOWDASH_BIO_PASSWORD=${{ secrets.FLOWDASH_BIO_PASSWORD }}" >> $GITHUB_ENV
#SINGULARITY_ROOT: /opt/hostedtoolcache/singularity/3.6.3/x64
#------------------------------------------------------------------------#
# Checkout Repository
- name: checkout repo
uses: actions/checkout@v2
#------------------------------------------------------------------------#
# Setup singularity
- name: setup singularity
uses: eWaterCycle/setup-singularity@v5
with:
singularity-version: 3.6.3
#------------------------------------------------------------------------#
# pull container
- name: pull container
run: singularity pull docker://docker.io/ktmeaton/plague-phylogeography:dev
#------------------------------------------------------------------------#
# Configure sra-toolkit
- name: configure sra-toolkit
run: |
mkdir -p ~/.ncbi/;
printf '/LIBS/GUID = "%s"\n' `uuidgen` > ~/.ncbi/user-settings.mkfg;
# run help
- name: run help
run: singularity exec plague-phylogeography_dev.sif snakemake --profile profiles/gh-actions help;
# install_singularity:
# name: Install with Singularity
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# steps:
# #------------------------------------------------------------------------#
# - name: setup environment variables
# run: |
# echo "SINGULARITY_DOCKER_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> $GITHUB_ENV
# echo "SINGULARITY_DOCKER_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }}" >> $GITHUB_ENV
# echo "FLOWDASH_BIO_USERNAME=${{ secrets.FLOWDASH_BIO_USERNAME }}" >> $GITHUB_ENV
# echo "FLOWDASH_BIO_PASSWORD=${{ secrets.FLOWDASH_BIO_PASSWORD }}" >> $GITHUB_ENV
# #SINGULARITY_ROOT: /opt/hostedtoolcache/singularity/3.6.3/x64
# #------------------------------------------------------------------------#
# # Checkout Repository
# - name: checkout repo
# uses: actions/checkout@v2
# #------------------------------------------------------------------------#
# # Setup singularity
# - name: setup singularity
# uses: eWaterCycle/setup-singularity@v5
# with:
# singularity-version: 3.6.3
# #------------------------------------------------------------------------#
# # pull container
# - name: pull container
# run: singularity pull docker://docker.io/ktmeaton/plague-phylogeography:dev
# #------------------------------------------------------------------------#
# # Configure sra-toolkit
# - name: configure sra-toolkit
# run: |
# mkdir -p ~/.ncbi/;
# printf '/LIBS/GUID = "%s"\n' `uuidgen` > ~/.ncbi/user-settings.mkfg;
# # run help
# - name: run help
# run: singularity exec plague-phylogeography_dev.sif snakemake --profile profiles/gh-actions help;
#----------------------------------------------------------------------------#
install_docker:
name: Install with Docker
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name: Lint
on:
push:
branches:
- '*'
- master
- dev
paths:
- '.github/workflows/lint.yaml'
- '**/*.yaml'
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
- name: lint other python
run: |
black $(find . -name "*.py")
flake8 $(find . -name "*.py")
flake8 --config setup.cfg $(find . -name "*.py")
#----------------------------------------------------------------------------#
# RST lint
rst_lint:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ name: Pipeline CI
on:
push:
branches:
- '*'
- master
- dev
paths:
- '.github/workflows/pipeline.yaml'
- 'config/snakemake.yaml'
Expand Down
145 changes: 0 additions & 145 deletions .github/workflows/pipeline.yaml.bak

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#------------------------------------------------------------------------------
name: Release
#------------------------------------------------------------------------------
# Workflow conditions
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
#------------------------------------------------------------------------------
jobs:
#----------------------------------------------------------------------------
release-notes:
name: Release Notes 📰
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
lfs: true
fetch-depth: 0

# Check 2 most recent tags, overwrites
- name: Tagged Release Notes
run: |
workflow/scripts/notes_release.sh `git tag | tail -n2 | head -n1` `git tag | tail -n1` > release-notes.md
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: release-notes
path: release-notes.md
retention-days: 7
#----------------------------------------------------------------------------
tagged-release:
name: Tagged Release
needs: [release-notes]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

steps:

- name: Download Release Notes
uses: actions/download-artifact@v2
with:
name: release-notes

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
body_path: release-notes.md
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
hooks:
- id: black
language_version: python3.7
exclude: workflow/scripts/Treemmer_v0.3.py
exclude: workflow/scripts/Treemmer.py

# flake8: Python PEP8 Compliance
- repo: https://gitlab.com/pycqa/flake8
Expand All @@ -26,7 +26,7 @@ repos:
'flake8-bugbear==20.1.4'
]
args: [--config=setup.cfg]
exclude: workflow/scripts/Treemmer_v0.3.py
exclude: workflow/scripts/Treemmer.py

# General Text + YAML Lint
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
Loading

0 comments on commit ea998f2

Please sign in to comment.