-
Notifications
You must be signed in to change notification settings - Fork 4
117 lines (101 loc) · 3.09 KB
/
python-package-conda.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
107
108
109
110
111
112
113
114
115
116
117
name: Conda
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
workflow_dispatch:
inputs:
reason:
description: Reason for the workflow dispatch.
required: true
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
max-parallel: 5
env:
FAKE_HISEQ: 1
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/ci_env.yml') }}-${{ hashFiles('conda-lock.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
environment-file: .github/ci_env.yml
activate-environment: pyseq
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Update env with conda
run: |
conda-lock install -n pyseq conda-lock.yml
conda env update -f environment-web.yml
- name: Install with pip
run: |
pip install .
# - name: Type check with Pyright
# run: |
# npm i -g pyright
# pyright pyseq2
- name: Test with Pytest
run: |
pytest -rP
# - name: Debug with tmate
# uses: mxschmitt/action-tmate@v3
- name: Build docs
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
conda install mkdocs mkdocs-material
pip install mkdocstrings[python] mkdocs-git-revision-date-localized-plugin
mkdocs build
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest'}}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
# tox:
# runs-on: ${{ matrix.os }}
# defaults:
# run:
# shell: bash -l {0}
# strategy:
# matrix:
# os: ["ubuntu-latest", "windows-latest"]
# max-parallel: 5
# env:
# FAKE_HISEQ: 1
# steps:
# - uses: actions/checkout@v2
# - name: Cache conda
# uses: actions/cache@v2
# env:
# # Increase this value to reset cache if etc/example-environment.yml has not changed
# CACHE_NUMBER: 0
# with:
# path: ~/conda_pkgs_dir
# key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
# hashFiles('.github/ci_env.yml') }}
# - uses: conda-incubator/setup-miniconda@v2
# with:
# miniforge-version: latest
# environment-file: .github/ci_env.yml
# activate-environment: pyseq
# use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
# - name: Test with Tox
# run: |
# tox -vv