-
Notifications
You must be signed in to change notification settings - Fork 29
53 lines (47 loc) · 1.56 KB
/
main.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
name: CI
on:
push:
branches:
- main
- CI
pull_request:
workflow_dispatch:
jobs:
miniconda:
name: Miniconda ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
steps:
- name: check out diffpy.pdfgui
uses: actions/checkout@v3
with:
repository: diffpy/diffpy.pdfgui
path: .
fetch-depth: 0 # avoid shallow clone with no tags
- name: Install Mamba
run: |
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh" -O mambaforge.sh
bash mambaforge.sh -b -p $HOME/mambaforge
echo "$HOME/mambaforge/bin" >> $GITHUB_PATH
source $HOME/mambaforge/etc/profile.d/conda.sh
conda init bash
- name: Create conda environment
run: |
source $HOME/mambaforge/etc/profile.d/conda.sh
conda create -n test_env python=3.12 xonsh regolith -c conda-forge -y
conda activate test_env
pip install case_insensitive_dict
- name: Install dependencies
run: |
source $HOME/mambaforge/etc/profile.d/conda.sh
conda activate test_env
mamba install --file requirements/run.txt
mamba install --file requirements/test.txt
pip install -e .
- name: Use Xvfb Action
uses: GabrielBB/xvfb-action@v1
with:
run: |
bash -c "source $HOME/mambaforge/etc/profile.d/conda.sh && conda activate test_env && python -m run_tests.py"