Skip to content

Commit 383c6e2

Browse files
committed
create .venv and .venv2
1 parent 87bb480 commit 383c6e2

File tree

1 file changed

+157
-141
lines changed

1 file changed

+157
-141
lines changed

.github/workflows/pr-check.yml

Lines changed: 157 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -15,164 +15,180 @@ on:
1515
- release-*
1616

1717
jobs:
18-
# tests:
19-
# name: Tests
20-
# runs-on: ${{ matrix.os }}
21-
# strategy:
22-
# fail-fast: false
23-
# matrix:
24-
# include:
25-
# - os: windows-latest
26-
# target: x86_64-pc-windows-msvc
27-
# run_cli: "yes"
28-
# - os: windows-latest
29-
# target: aarch64-pc-windows-msvc
30-
# run_cli: "no"
31-
# - os: ubuntu-latest
32-
# target: x86_64-unknown-linux-musl
33-
# run_cli: "yes"
34-
# - os: macos-latest
35-
# target: x86_64-apple-darwin
36-
# run_cli: "yes"
37-
# - os: macos-14
38-
# target: aarch64-apple-darwin
39-
# run_cli: "yes"
40-
# steps:
41-
# - name: Checkout
42-
# uses: actions/checkout@v4
18+
tests:
19+
name: Tests
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
# - os: windows-latest
26+
# target: x86_64-pc-windows-msvc
27+
# run_cli: "yes"
28+
# - os: windows-latest
29+
# target: aarch64-pc-windows-msvc
30+
# run_cli: "no"
31+
- os: ubuntu-latest
32+
target: x86_64-unknown-linux-musl
33+
run_cli: "yes"
34+
# - os: macos-latest
35+
# target: x86_64-apple-darwin
36+
# run_cli: "yes"
37+
# - os: macos-14
38+
# target: aarch64-apple-darwin
39+
# run_cli: "yes"
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
4343

44-
# - name: Set Python to PATH
45-
# uses: actions/setup-python@v5
46-
# with:
47-
# python-version: "3.x"
44+
- name: Set Python to PATH
45+
uses: actions/setup-python@v5
46+
with:
47+
python-version: "3.x"
4848

49-
# - name: Homebrew Python
50-
# if: startsWith( matrix.os, 'macos')
51-
# run: brew install python
52-
# shell: bash
49+
- name: Homebrew Python
50+
if: startsWith( matrix.os, 'macos')
51+
run: brew install python
52+
shell: bash
5353

54-
# - name: Add Conda to PATH
55-
# if: startsWith( matrix.os, 'windows')
56-
# run: |
57-
# $path = $env:PATH + ";" + $env:CONDA + "\condabin"
58-
# echo "PATH=$path" >> $env:GITHUB_ENV
54+
- name: Add Conda to PATH
55+
if: startsWith( matrix.os, 'windows')
56+
run: |
57+
$path = $env:PATH + ";" + $env:CONDA + "\condabin"
58+
echo "PATH=$path" >> $env:GITHUB_ENV
5959
60-
# - name: Add Conda to PATH
61-
# if: startsWith( matrix.os, 'ubuntu')
62-
# run: echo "PATH=$PATH:$CONDA/condabin" >> $GITHUB_ENV
63-
# shell: bash
60+
- name: Add Conda to PATH
61+
if: startsWith( matrix.os, 'ubuntu')
62+
run: echo "PATH=$PATH:$CONDA/condabin" >> $GITHUB_ENV
63+
shell: bash
6464

65-
# - name: Install Conda + add to PATH
66-
# if: startsWith( matrix.os, 'macos')
67-
# run: |
68-
# curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
69-
# bash ~/miniconda.sh -b -p ~/miniconda
70-
# echo "PATH=$PATH:$HOME/miniconda/bin" >> $GITHUB_ENV
71-
# echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV
72-
# shell: bash
65+
- name: Install Conda + add to PATH
66+
if: startsWith( matrix.os, 'macos')
67+
run: |
68+
curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
69+
bash ~/miniconda.sh -b -p ~/miniconda
70+
echo "PATH=$PATH:$HOME/miniconda/bin" >> $GITHUB_ENV
71+
echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV
72+
shell: bash
7373

74-
# - name: Check Conda version
75-
# run: conda info --all
76-
77-
# - name: Create Conda Environments
78-
# run: |
79-
# conda create -n test-env1 python=3.12 -y
80-
# conda create -n test-env-no-python -y
81-
# conda create -p ./prefix-envs/.conda1 python=3.12 -y
82-
# conda create -p ./prefix-envs/.conda-nopy -y
83-
84-
# - name: Install pipenv
85-
# run: pip install pipenv
86-
87-
# - name: Check pipenv version
88-
# run: pipenv --version
89-
90-
# - name: Install virtualenvwrapper
91-
# # Activation of the script doesn't work on mac for some reason (didn't check why yet)
92-
# # But linux is sufficient for the tests
93-
# if: startsWith( matrix.os, 'ubuntu')
94-
# run: |
95-
# pip install virtualenvwrapper
96-
# echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
97-
# mkdir -p $HOME/.virtualenvs
98-
# source virtualenvwrapper.sh
99-
# mkvirtualenv venv_wrapper_env1
100-
# shell: bash
74+
- name: Check Conda version
75+
run: conda info --all
76+
77+
- name: Create Conda Environments
78+
run: |
79+
conda create -n test-env1 python=3.12 -y
80+
conda create -n test-env-no-python -y
81+
conda create -p ./prefix-envs/.conda1 python=3.12 -y
82+
conda create -p ./prefix-envs/.conda-nopy -y
83+
84+
- name: Install pipenv
85+
run: pip install pipenv
86+
87+
- name: Check pipenv version
88+
run: pipenv --version
89+
90+
- name: Install virtualenvwrapper
91+
# Activation of the script doesn't work on mac for some reason (didn't check why yet)
92+
# But linux is sufficient for the tests
93+
if: startsWith( matrix.os, 'ubuntu')
94+
run: |
95+
pip install virtualenvwrapper
96+
echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
97+
mkdir -p $HOME/.virtualenvs
98+
source virtualenvwrapper.sh
99+
mkvirtualenv venv_wrapper_env1
100+
shell: bash
101101

102-
# - name: Install virtualenvwrapper-win
103-
# if: startsWith( matrix.os, 'windows')
104-
# run: |
105-
# pip install virtualenvwrapper-win
106-
# echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
107-
# shell: bash
102+
- name: Install virtualenvwrapper-win
103+
if: startsWith( matrix.os, 'windows')
104+
run: |
105+
pip install virtualenvwrapper-win
106+
echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
107+
shell: bash
108108

109-
# - name: Install pyenv
110-
# if: startsWith( matrix.os, 'windows')
111-
# run: |
112-
# choco install pyenv-win -y
113-
# echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
114-
# echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
115-
# shell: bash
109+
- name: Install pyenv
110+
if: startsWith( matrix.os, 'windows')
111+
run: |
112+
choco install pyenv-win -y
113+
echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
114+
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
115+
shell: bash
116116

117-
# - name: Install pyenv and pyenv-virtualenv
118-
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
119-
# run: |
120-
# curl https://pyenv.run | bash
121-
# echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
122-
# echo "PATH=$HOME/.pyenv/bin:$PATH" >> $GITHUB_ENV
123-
# shell: bash
117+
- name: Install pyenv and pyenv-virtualenv
118+
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
119+
run: |
120+
curl https://pyenv.run | bash
121+
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
122+
echo "PATH=$HOME/.pyenv/bin:$PATH" >> $GITHUB_ENV
123+
shell: bash
124124

125-
# - name: Check Pyenv version
126-
# run: pyenv --version
127-
# shell: bash
125+
- name: Check Pyenv version
126+
run: pyenv --version
127+
shell: bash
128128

129-
# - name: Install Pyenv Python(s)
130-
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
131-
# run: |
132-
# pyenv install --list
133-
# pyenv install 3.12.4 3.8.19
134-
# shell: bash
129+
- name: Install Pyenv Python(s)
130+
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
131+
run: |
132+
pyenv install --list
133+
pyenv install 3.12.4 3.8.19
134+
shell: bash
135135

136-
# # pyenv-win install list has not updated for a while
137-
# - name: Install Pyenv Python(s)
138-
# if: startsWith( matrix.os, 'windows')
139-
# run: |
140-
# pyenv install --list
141-
# pyenv install 3.10.5 3.8.10
142-
# shell: bash
136+
# pyenv-win install list has not updated for a while
137+
- name: Install Pyenv Python(s)
138+
if: startsWith( matrix.os, 'windows')
139+
run: |
140+
pyenv install --list
141+
pyenv install 3.10.5 3.8.10
142+
shell: bash
143143

144-
# - name: Create pyenv-virtualenv envs
145-
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
146-
# run: |
147-
# eval "$(pyenv virtualenv-init -)"
148-
# pyenv virtualenv 3.12 pyenv-virtualenv-env1
149-
# shell: bash
144+
- name: Create pyenv-virtualenv envs
145+
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
146+
run: |
147+
eval "$(pyenv virtualenv-init -)"
148+
pyenv virtualenv 3.12 pyenv-virtualenv-env1
149+
shell: bash
150150

151-
# - name: Rust Tool Chain setup
152-
# uses: dtolnay/rust-toolchain@stable
153-
# with:
154-
# toolchain: stable
155-
# targets: ${{ matrix.target }}
151+
# region venv
152+
- name: Create .venv
153+
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
154+
run: |
155+
python -m venv .venv
156+
shell: bash
156157

157-
# - name: Cargo Fetch
158-
# run: cargo fetch
159-
# shell: bash
158+
- name: Create .venv2
159+
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
160+
run: |
161+
python -m venv .venv2
162+
shell: bash
160163

161-
# - name: Find Environments
162-
# if: matrix.run_cli == 'yes'
163-
# run: cargo run --release --target ${{ matrix.target }}
164-
# shell: bash
164+
# endregion venv
165165

166-
# - name: Run Tests
167-
# # Run integration tests in a single thread,
168-
# # We end up creating conda envs and running multiple tests in parallel
169-
# # that creat conda envs simultaneously causes issues (sometimes the conda envs do not seem to get created)
170-
# # Similar issues were identified in vscode-jupyter tests as well (something to do with conda lock files or the like)
171-
# run: cargo test --frozen --features ci -- --nocapture --test-threads=1
172-
# env:
173-
# RUST_BACKTRACE: 1
174-
# RUST_LOG: trace
175-
# shell: bash
166+
# Rust
167+
- name: Rust Tool Chain setup
168+
uses: dtolnay/rust-toolchain@stable
169+
with:
170+
toolchain: stable
171+
targets: ${{ matrix.target }}
172+
173+
- name: Cargo Fetch
174+
run: cargo fetch
175+
shell: bash
176+
177+
- name: Find Environments
178+
if: matrix.run_cli == 'yes'
179+
run: cargo run --release --target ${{ matrix.target }}
180+
shell: bash
181+
182+
- name: Run Tests
183+
# Run integration tests in a single thread,
184+
# We end up creating conda envs and running multiple tests in parallel
185+
# that creat conda envs simultaneously causes issues (sometimes the conda envs do not seem to get created)
186+
# Similar issues were identified in vscode-jupyter tests as well (something to do with conda lock files or the like)
187+
run: cargo test --frozen --features ci -- --nocapture --test-threads=1
188+
env:
189+
RUST_BACKTRACE: 1
190+
RUST_LOG: trace
191+
shell: bash
176192

177193
specific-tests:
178194
name: Other Tests

0 commit comments

Comments
 (0)