-
Notifications
You must be signed in to change notification settings - Fork 6
106 lines (90 loc) · 2.72 KB
/
actions.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Continuous Integration / Deployment
on: [pull_request, push]
jobs:
Format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Apply formatting
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_PYLINT: true
VALIDATE_PYTHON_FLAKE8: true
VALIDATE_PYTHON_ISORT: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GITIGNORED_FILES: true
Test:
name: ${{ matrix.os }}
needs:
- Format
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
environment-file: environment.yml
use-only-tar-bz2: true
auto-activate-base: false
activate-environment: deimos
- name: Install DEIMoS
run: pip install -e .
- name: Test environment
run: |
which deimos
deimos --help
pytest
Deploy:
needs:
- Test
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: 3.12
channels: conda-forge,bioconda
use-only-tar-bz2: true
auto-activate-base: true
- name: Install dependencies
run: |
mamba install boa anaconda-client conda-verify
- name: Build conda package
run: |
mkdir build/
conda mambabuild conda-recipe/ --output-folder build/
conda index build/
- name: Convert to win-64
run: conda convert -p win-64 build/linux-64/*.tar.bz2 -o build/
- name: Convert to osx-64
run: conda convert -p osx-64 build/linux-64/*.tar.bz2 -o build/
- name: Upload packages
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
anaconda upload build/linux-64/*.tar.bz2
anaconda upload build/osx-64/*.tar.bz2
anaconda upload build/win-64/*.tar.bz2