Skip to content

relock w/ conda-lock #36

relock w/ conda-lock

relock w/ conda-lock #36

Workflow file for this run

name: tests
on:
push:
branches:
- main
pull_request: null
concurrency:
group: tests
cancel-in-progress: false
jobs:
tests:
name: tests
runs-on: "ubuntu-latest"
if: github.event.pull_request.title != 'relock w/ conda-lock'
steps:
- uses: actions/checkout@v4
- name: relock
id: relock
uses: ./
with:
environment-file: test-env.yml
lock-file: conda-lock.yml
ignored-packages: ''
relock-all-packages: false
github-token: ${{ secrets.GH_PAT }}
automerge: false
base-branch: ${{ github.head_ref }}
- name: did it relock?
if: steps.relock.outputs.relocked != 'true'
run: exit 1
- name: test that PR is OK
if: steps.relock.outputs.relocked == 'true'
shell: bash
run: |
gh pr checkout ${{ steps.relock.outputs.pull-request-number }}
ls -lah
if [ -f conda-lock.yml ]; then
: # do nothing
else
echo "conda-lock.yml not found"
exit 1
fi
grep numpy conda-lock.yml
grep python conda-lock.yml
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
- name: relock again
id: relock_again
uses: ./
with:
environment-file: test-env.yml
lock-file: conda-lock.yml
ignored-packages: ''
relock-all-packages: false
github-token: ${{ secrets.GH_PAT }}
automerge: false
base-branch: ${{ github.head_ref }}
- name: did it not relock?
if: steps.relock_again.outputs.relocked == 'true'
run: exit 1
- name: close PR 1
if: always()
continue-on-error: true
shell: bash
run: gh pr close ${{ steps.relock.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
- name: close PR 2
if: always()
continue-on-error: true
shell: bash
run: gh pr close ${{ steps.relock_again.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}