-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (38 loc) · 1.03 KB
/
testing.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
name: Unit Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.10"
auto-update-conda: true
auto-activate-base: false
- name: Create conda environment from environment.yml
run: |
conda env create --file environment.yml # Create environment from environment.yml
conda init zsh
source ~/.zshrc
conda activate phasefieldx-env # Replace 'test-env' with your actual environment name
- name: Install project dependencies (pyproject.toml)
run: |
conda init zsh
source ~/.zshrc
conda activate phasefieldx-env
pip install .
- name: Run tests with pytest
run: |
conda init zsh
source ~/.zshrc
conda activate phasefieldx-env
pytest test/ --disable-warnings