-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (57 loc) · 1.49 KB
/
cicd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI/CD
on:
push:
branches:
- '**'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
py_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Nox
uses: excitedleigh/[email protected]
- name: black_isort_flake8_mypy
run: nox -s form lint type
- name: safety
run: nox -s security
snake_check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.9
update-conda: true
conda-channels: conda-forge, bioconda
- name: Install Dependencies
run: |
conda install -c conda-forge mamba
mamba install -c conda-forge -c bioconda --file workflow/envs/cicd_min.txt
- name: Snakefmt_lint
run: |
snakemake --lint
snakefmt workflow
- name: Snakemake unit tests
run: pytest .tests/unit
- name: Snakemake integration tests
run: pytest .tests/integration
release:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
needs: [py_check, snake_check]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Python Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}