-
Notifications
You must be signed in to change notification settings - Fork 17
62 lines (53 loc) · 2.13 KB
/
copilot-setup-steps.yml
File metadata and controls
62 lines (53 loc) · 2.13 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
# This file was generated based on the recommendations from https://docs.github.com/en/enterprise-cloud@latest/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent#preinstalling-tools-or-dependencies-in-copilots-environment
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
env:
EXAMPLES_FOLDER: examples
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code with submodule
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: biobuddy
python-version: 3.11.11
- name: Install dependencies
run: |
pip install . && pip uninstall -y biobuddy
pip install scipy==1.15.2 numpy==1.25.2 lxml ezc3d
- name: Install test dependencies
run: |
pip install pytest pytest-cov codecov black
conda install -c opensim-org opensim=4.5.1
conda install -c conda-forge biorbd=1.11.2 deepdiff
- name: Set environment variables for Copilot
run: |
echo "CONDA_PREFIX=$CONDA_PREFIX" >> $GITHUB_ENV
echo "PYTHONPATH=$CONDA_PREFIX/lib/python3.11/site-packages:$PYTHONPATH" >> $GITHUB_ENV
echo "PATH=$CONDA_PREFIX/bin:$PATH" >> $GITHUB_ENV
- name: Verify environment setup
run: |
echo "Python location: $(which python)"
echo "Conda prefix: $CONDA_PREFIX"
echo "Python path: $PYTHONPATH"
python -c "import sys; print('Python sys.path:'); [print(f' {p}') for p in sys.path]"