Skip to content

Commit 611502b

Browse files
refactor: consolidate OS-specific steps into unified steps
- Use shell: bash for cross-platform compatibility - Single 'Install requirements' step works on all OS - Single 'Run tests' step works on all OS - Bash is available on Windows runners and handles paths correctly
1 parent 1a7f2c9 commit 611502b

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,18 @@ jobs:
3333
python-version: ${{ matrix.python-version }}
3434
- name: Install Rust Toolchain
3535
run: rustup toolchain install stable --profile minimal --no-self-update
36-
- name: Install requirements (Unix)
37-
if: runner.os != 'Windows'
36+
- name: Install requirements
37+
shell: bash
3838
run: |
3939
python -m venv venv
40-
. venv/bin/activate
40+
source venv/bin/activate
4141
pip install maturin
4242
pip install -r tests/requirements.txt
4343
maturin develop
44-
- name: Install requirements (Windows)
45-
if: runner.os == 'Windows'
44+
- name: Run tests
45+
shell: bash
4646
run: |
47-
python -m venv venv
48-
venv\Scripts\activate
49-
pip install maturin
50-
pip install -r tests/requirements.txt
51-
maturin develop
52-
- name: Run tests (Unix)
53-
if: runner.os != 'Windows'
54-
run: |
55-
. venv/bin/activate
56-
python -m pytest --cov-report=xml:coverage.xml --cov=. --junitxml=unit.junit.xml
57-
- name: Run tests (Windows)
58-
if: runner.os == 'Windows'
59-
run: |
60-
venv\Scripts\activate
47+
source venv/bin/activate
6148
python -m pytest --cov-report=xml:coverage.xml --cov=. --junitxml=unit.junit.xml
6249
6350
- name: Upload results to codecov

0 commit comments

Comments
 (0)