-
Notifications
You must be signed in to change notification settings - Fork 13
89 lines (71 loc) · 2.39 KB
/
cgatcore_python.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
name: cgatcore
on: [push, pull_request]
jobs:
build:
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Cache conda
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/environments/cgat-core.yml') }}
- name: Set installer URL
id: set-installer-url
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
echo "installer-url=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" >> $GITHUB_ENV
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
echo "installer-url=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh" >> $GITHUB_ENV
fi
- uses: conda-incubator/setup-miniconda@v2
with:
installer-url: ${{ env.installer-url }}
python-version: ${{ matrix.python-version }}
channels: conda-forge, bioconda, defaults
channel-priority: true
activate-environment: cgat-core
environment-file: conda/environments/cgat-core.yml
- name: Configure Conda Paths
run: echo "/usr/share/miniconda3/condabin" >> $GITHUB_PATH
- name: Show conda
run: |
conda info
conda list
- name: Debug Python Environment
run: |
python --version
pip list
openssl version
- name: Test
run: |
pip install .
./all-tests.sh
deploy_docs:
name: Deploy MkDocs Documentation
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install MkDocs and Dependencies
run: |
pip install mkdocs mkdocs-material mkdocstrings[python]
- name: Build and Deploy MkDocs Site
run: mkdocs gh-deploy --force --clean
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}