Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove lock file creation from pre release workflow #2432

Merged
merged 7 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/create-lockfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: create-lockfiles

on:
workflow_dispatch: # manual trigger

defaults:
run:
shell: bash -l {0}


jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
auto-activate-base: true
activate-environment: ""
use-mamba: true

- name: Install conda-lock
run: mamba install -c conda-forge conda-lock

- name: Update Mamba # see https://github.com/conda-incubator/setup-miniconda/issues/288
run: mamba update mamba

- name: Generate lockfiles
run: |
conda-lock -f tardis_env3.yml -p linux-64 -p osx-64
conda lock render conda-lock.yml

- uses: actions/upload-artifact@v3
with:
name: lockfiles
path: |
conda-linux-64.lock
conda-osx-64.lock
conda-lock.yml
37 changes: 2 additions & 35 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,6 @@ defaults:
shell: bash -l {0}

jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
auto-activate-base: true
activate-environment: ""
use-mamba: true

- name: Install conda-lock
run: mamba install -c conda-forge conda-lock=1.0.5

- name: Generate lockfiles
run: |
conda-lock -f tardis_env3.yml -p linux-64 -p osx-64
conda lock render conda-lock.yml

- uses: actions/upload-artifact@v3
with:
name: lockfiles
path: |
conda-linux-64.lock
conda-osx-64.lock
conda-lock.yml

zenodo:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -80,7 +50,7 @@ jobs:
path: .zenodo.json

pull_request:
needs: [lock, zenodo]
needs: zenodo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -89,11 +59,8 @@ jobs:
with:
path: /tmp

- name: Copy files to repository
- name: Copy zenodo.json to repository
run: |
cp /tmp/lockfiles/conda-linux-64.lock .
cp /tmp/lockfiles/conda-osx-64.lock .
cp /tmp/lockfiles/conda-lock.yml .
cp /tmp/zenodo_json/.zenodo.json .

- name: Get current date
Expand Down
Loading