Skip to content

debug

debug #8

name: Update lockfile
on:
workflow_dispatch:
push:
schedule:
# At 06:12 UTC on Monday
- cron: 12 6 * * MON
jobs:
conda-lock:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
defaults:
run:
# Ensure the environment is activated
# <https://github.com/mamba-org/setup-micromamba#about-login-shells>
shell: bash -l {0}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda/environment-conda-locker.yaml
environment-name: conda-lock-env
cache-environment: true
- name: Run conda-lock
run: |
conda-lock lock --mamba \
--extras test \
--filter-extras \
--file pyproject.toml \
--file conda/environment-test-${{ matrix.python-version }}.yaml \
--lockfile conda/conda-lock-${{ matrix.python-version }}.yaml
- name: Upload lockfile
uses: actions/upload-artifact@v2
with:
name: conda-lock-${{ matrix.python-version }}.yaml
path: conda/conda-lock-${{ matrix.python-version }}.yaml
open-pr:
needs: conda-lock
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Delete old lockfiles
run: |
rm -f conda/conda-lock-*.yaml
- name: Download all lockfiles
uses: actions/download-artifact@v2
with:
path: conda
- name: Print diff
run: |
pwd
ls -al conda
ls -al /home/runner/work/CausalPy/CausalPy/conda/
git status
git diff
- name: Open a pull request
uses: peter-evans/create-pull-request@v5
with:
# This PAT should have read-write permissions for "Pull Requests"
# and read-write permissions for "Contents".
token: ${{ secrets.GH_PAT_FOR_PR }}
commit-message: Relock dependencies
title: Relock dependencies
body: >
This pull request relocks the dependencies with conda-lock.
It was created automatically with the GitHub Action
[update-lockfile.yml](.github/workflows/update-lockfile.yml).
branch: relock-deps
labels: conda-lock
delete-branch: true
committer: update-lockfile.yml <nobody@pymc-labs.com>
author: update-lockfile.yml <nobody@pymc-labs.com>