Repository navigation
82 lines (72 loc) · 2.2 KB
/
Copy pathCI.yml
File metadata and controls
82 lines (72 loc) · 2.2 KB
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
name: CI
on:
workflow_dispatch: ~
push:
# Only run on pushes to the master branch
branches: [ master ]
# Only run on changes to the mddb_workflow directory
paths:
- 'mddb_workflow/**'
- 'envs/environment.yml'
- 'test/**'
pull_request:
branches: [ master ]
paths:
- 'mddb_workflow/**'
- 'envs/environment.yml'
# everyday Monday to Saturday at 7am UTC
schedule:
- cron: "0 7 * * 1-6"
jobs:
# Name of the Job
install_and_test:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "Repository -> ${{ github.repository }}"
- run: echo "Branch -> ${{ github.ref }}"
- run: echo "Trigger event -> ${{ github.event_name }}"
- run: echo "Runner OS -> ${{ runner.os }}"
- name: List files in the repository
run: |
ls ${{ github.workspace }}
# - name: Remove all micromamba installations
# run: |
# rm -rf $HOME/.bash_profile $HOME/.conda $HOME/micromamba $HOME/micromamba-bin 2>/dev/null
# touch $HOME/.bash_profile
- name: Setup-micromamba
uses: mamba-org/setup-micromamba@v2.0.4
with:
generate-run-shell: true
micromamba-version: '2.0.2-2'
post-cleanup: 'all'
init-shell: bash
environment-file: envs/environment.yml
create-args: >-
python=${{ matrix.python-version }}
pytest
pytest-cov
pip
cache-environment: true
cache-downloads: true
- name: List installed package versions
shell: bash -l {0}
run: micromamba list
- name: Install mddb_workflow
shell: bash -l {0}
run: python -m pip install -e .
- name: Run CI tests
if: github.event_name == 'push' || github.event_name == 'pull_request'
shell: bash -l {0}
run: pytest -m CI
timeout-minutes: 20
- name: Run all tests
if: github.event_name == 'schedule'
shell: bash -l {0}
run: pytest --all
timeout-minutes: 60