Skip to content

Commit 89c0b67

Browse files
authored
Use conda for update test (#18)
* Switch to conda to avoid lockfile false positives * Specify cores to use in integration test
1 parent 34831ce commit 89c0b67

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/template-check-version.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,20 @@ jobs:
2222
with:
2323
ref: "latest" # This avoids comparing against development versions.
2424

25-
- name: Setup pixi
26-
uses: prefix-dev/setup-pixi@v0.8.3
25+
- uses: mamba-org/setup-micromamba@v2
26+
with:
27+
environment-name: ${{ github.event.repository.name }}-copier
28+
create-args: copier python=3.12
29+
post-cleanup: all
30+
cache-environment: true
2731

28-
- name: Add copier, install it, and stash to avoid 'dirty' copier warnings
29-
run: |
30-
pixi add copier
31-
pixi install
32-
git stash push -m "Stash pixi lock and toml" -- pixi.lock pixi.toml
3332
- name: Add dummy GitHub credentials
3433
run: |
3534
git config --global user.name Copier update
3635
git config --global user.email check@dummy.bot.com
3736
3837
- name: Run copier update
39-
run: pixi run copier update --skip-answered --defaults
38+
run: copier update --skip-answered --defaults
4039

4140
- name: Check for template changes
4241
run: test -z "$(git status --porcelain)" || echo "UPDATE=true" >> $GITHUB_ENV

template/tests/clio_test.py.jinja

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def test_standard_file_existance(module_path, file):
4040
def test_snakemake_all_failure(module_path):
4141
"""The snakemake 'all' rule should return an error by default."""
4242
process = subprocess.run(
43-
"snakemake", shell=True, cwd=module_path, capture_output=True
43+
"snakemake --cores 4", shell=True, cwd=module_path, capture_output=True
4444
)
4545
assert "INVALID (missing locally)" in str(process.stderr)
4646

4747

4848
def test_snakemake_integration_testing(module_path):
4949
"""Run a light-weight test simulating someone using this module."""
5050
assert subprocess.run(
51-
"snakemake --use-conda",
51+
"snakemake --use-conda --cores 4",
5252
shell=True,
5353
check=True,
5454
cwd=module_path / "tests/integration",

0 commit comments

Comments
 (0)