-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.51 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
test:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10, 3.11, 3.12]
defaults:
run:
shell: bash -l {0} # a login shell is required for conda activation
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: cache-conda
uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Create Conda environment
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
# environment-file: conda-linux-64.lock; waiting for conda update
environment-file: environment.yml
use-only-tar-bz2: true
activate-environment: "nbis"
- name: Echo environment
run: |
echo "CONDA_PREFIX: $CONDA_PREFIX"
conda list
conda env list
- name: Install test dependencies
run: conda install -c conda-forge pytest pip tox pylint
- name: Install R revealjs
run: R -e "install.packages('revealjs', repos='https://cran.rstudio.com/')"
- name: Install nbis-project-admin
run: pip install --no-deps .
- name: Run tests
run: pytest
- name: Run tox to test installation of project
run: python -m tox -e project