Skip to content

Commit bc8e4cc

Browse files
authored
Fix channel priority (#84)
1 parent 52dc9e6 commit bc8e4cc

File tree

7 files changed

+29
-4
lines changed

7 files changed

+29
-4
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- main
66
pull_request: null
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
build:
1014
timeout-minutes: 10

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- main
66
pull_request: null
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
test:
1014
name: test

.github/workflows/test_caching.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- main
77
pull_request: null
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
defaults:
1014
run:
1115
shell: bash -l {0}

.github/workflows/test_lock.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- main
66
pull_request: null
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
test:
1014
name: Test lock files

.github/workflows/test_options.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
- main
66
pull_request: null
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
defaults:
913
run:
1014
shell: bash -el {0}
@@ -205,6 +209,12 @@ jobs:
205209

206210
steps:
207211
- uses: actions/checkout@v2
212+
213+
- name: Modify environemnt.yml to require flexible channel priority
214+
run: |
215+
contents = open("environment.yml").read()
216+
open("environment.yml", "w").write(contents.replace("python", "pkgs/main::python"))
217+
shell: python
208218

209219
- name: install mamba
210220
uses: ./
@@ -216,6 +226,7 @@ jobs:
216226
run: |
217227
cat ~/.condarc
218228
grep "channel_priority: flexible" ~/.condarc
229+
micromamba list | grep -E 'python\s+3\.8' | grep -qv conda-forge
219230
220231
test_condarc_file:
221232
name: Test condarc-file

dist/main/index.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ async function createOrUpdateEnv (envName, envFilePath, extraSpecs, logLevel) {
305305
const action = fs.existsSync(envFolder) ? 'update' : 'create'
306306
const selectedExtraSpecs = selectSelectors(extraSpecs)
307307
core.info(`${action} env ${envName}`)
308-
let cmd = micromambaCmd(`${action} -n ${envName} --strict-channel-priority -y`, logLevel, PATHS.micromambaExe)
308+
let cmd = micromambaCmd(`${action} -n ${envName} -y`, logLevel, PATHS.micromambaExe)
309309
if (selectedExtraSpecs.length) {
310310
cmd += ' ' + selectedExtraSpecs.map(e => `"${e}"`).join(' ')
311311
}
@@ -386,7 +386,6 @@ async function installEnvironment (inputs, envFilePath, envYaml) {
386386
const autoactivateCmd = `micromamba activate ${envName};`
387387
if (process.platform === 'win32') {
388388
const ps1File = (await executePwsh('echo $profile')).stdout.trim()
389-
core.warning(path.dirname(ps1File))
390389
fs.appendFileSync(ps1File, '\n' + autoactivateCmd)
391390
dumpFileContents(ps1File)
392391
}

0 commit comments

Comments
 (0)