Skip to content

relock w/ conda-lock #2915

relock w/ conda-lock

relock w/ conda-lock #2915

Workflow file for this run

name: tests
on:
workflow_dispatch: null
# push:
# branches:
# - main
merge_group: null
pull_request: null
env:
PY_COLORS: 1
defaults:
run:
shell: bash -leo pipefail {0}
jobs:
check:
name: check if we can skip the merge queue
outputs:
skip-check: ${{ steps.merge-queue-ci-skipper.outputs.skip-check }}
runs-on: ubuntu-latest
steps:
- name: check if we can skip the merge queue
id: merge-queue-ci-skipper
uses: cariad-tech/merge-queue-ci-skipper@cf80db21fc70244e36487acc531b3f1118889b0a
with:
secret: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
tests:
name: tests
needs:
- check
runs-on: "ubuntu-latest"
concurrency:
group: ${{ github.workflow }}-tests-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' }}
with:
fetch-depth: 0
- name: setup conda
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
if: ${{ needs.check.outputs.skip-check != 'true' }}
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: generate token
id: generate_token
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
id: install-code
if: ${{ needs.check.outputs.skip-check != 'true' }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
mkdir -p ~/.conda-smithy/
echo $GH_TOKEN > ~/.conda-smithy/github.token
chmod 600 ~/.conda-smithy/github.token
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run test suite
if: ${{ needs.check.outputs.skip-check != 'true' }}
run: |
echo "owner: ${GITHUB_REPOSITORY_OWNER}"
export CF_WEBSERVICES_TEST=1
if [[ '${{ github.event.pull_request.head.repo.fork }}' == "true" ]]; then
unset CF_WEBSERVICES_TOKEN
unset CF_WEBSERVICES_APP_ID
unset CF_WEBSERVICES_PRIVATE_KEY
unset GH_TOKEN
unset CF_WEBSERVICES_FEEDSTOCK_TOKEN
unset CF_WEBSERVICES_FEEDSTOCK_APP_ID
fi
pytest -v conda_forge_webservices
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
PROD_BINSTAR_TOKEN: ${{ secrets.PROD_BINSTAR_TOKEN }}
STAGING_BINSTAR_TOKEN: ${{ secrets.HEROKU_ONLY_STAGING_BINSTAR_TOKEN }}
CF_WEBSERVICES_TOKEN: ${{ secrets.CF_WEBSERVICES_TOKEN }}
CF_WEBSERVICES_APP_ID: ${{ secrets.CF_CURATOR_APP_ID }}
CF_WEBSERVICES_PRIVATE_KEY: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
CF_WEBSERVICES_FEEDSTOCK_APP_ID: ${{ secrets.CF_CURATOR_APP_ID }}
CF_WEBSERVICES_FEEDSTOCK_PRIVATE_KEY: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
ACTION_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
docker-build:
name: docker-build
needs:
- check
runs-on: "ubuntu-latest"
concurrency:
group: ${{ github.workflow }}-docker-build-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' }}
with:
fetch-depth: 0
- name: setup conda
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
if: ${{ needs.check.outputs.skip-check != 'true' }}
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: install code
id: install-code
if: ${{ needs.check.outputs.skip-check != 'true' }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
pip install --no-deps --no-build-isolation -e .
version=$(python -c "import conda_forge_webservices; print(conda_forge_webservices.__version__.replace('+', '.'))")
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: set up docker buildx
if: ${{ needs.check.outputs.skip-check != 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'conda-forge/conda-forge-webservices') }}
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
- name: login to docker hub
if: ${{ needs.check.outputs.skip-check != 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'conda-forge/conda-forge-webservices') }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
with:
username: condaforgebot
password: ${{ secrets.CF_BOT_DH_PASSWORD }}
- name: build and push docker image
if: ${{ needs.check.outputs.skip-check != 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'conda-forge/conda-forge-webservices') }}
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v5
with:
context: .
file: Dockerfile_wda
push: true
tags: condaforge/webservices-dispatch-action:${{ steps.install-code.outputs.version }}
live-tests-upload:
name: live-tests-upload
runs-on: "ubuntu-latest"
needs:
- check
- tests
concurrency:
group: ${{ github.event.pull_request.head.repo.fork != 'true' && 'live-tests-upload' || format('{0}-{1}', github.workflow, github.ref) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: generate token
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
mkdir -p ~/.conda-smithy/
echo $GH_TOKEN > ~/.conda-smithy/github.token
chmod 600 ~/.conda-smithy/github.token
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run package upload tests
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
export CF_WEBSERVICES_TEST=1
./scripts/run_cfep13_tests.sh
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
PROD_BINSTAR_TOKEN: ${{ secrets.PROD_BINSTAR_TOKEN }}
STAGING_BINSTAR_TOKEN: ${{ secrets.HEROKU_ONLY_STAGING_BINSTAR_TOKEN }}
POST_STAGING_BINSTAR_TOKEN: ${{ secrets.POST_STAGING_BINSTAR_TOKEN }}
CF_WEBSERVICES_TOKEN: ${{ secrets.CF_WEBSERVICES_TOKEN }}
CF_WEBSERVICES_APP_ID: ${{ secrets.CF_CURATOR_APP_ID }}
CF_WEBSERVICES_PRIVATE_KEY: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
ACTION_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
live-tests-rerender:
name: live-tests-rerender
runs-on: "ubuntu-latest"
needs:
- check
- tests
- docker-build
concurrency:
group: ${{ github.event.pull_request.head.repo.fork != 'true' && 'live-tests-rerender' || format('{0}-{1}', github.workflow, github.ref) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: generate token
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
mkdir -p ~/.conda-smithy/
echo $GH_TOKEN > ~/.conda-smithy/github.token
chmod 600 ~/.conda-smithy/github.token
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run rerender tests
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
if [[ "${GITHUB_HEAD_REF}" != "" ]]; then
branch="${GITHUB_HEAD_REF}"
else
branch="${GITHUB_REF_NAME}"
fi
version=$(python -c "import conda_forge_webservices; print(conda_forge_webservices.__version__.replace('+', '.'))")
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${version}"
cd tests
pytest -vvs --branch=${branch} test_live_rerender.py
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
live-tests-linter:
name: live-tests-linter
runs-on: "ubuntu-latest"
needs:
- check
- tests
- docker-build
concurrency:
group: ${{ github.event.pull_request.head.repo.fork != 'true' && 'live-tests-linter' || format('{0}-{1}', github.workflow, github.ref) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: generate token
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
mkdir -p ~/.conda-smithy/
echo $GH_TOKEN > ~/.conda-smithy/github.token
chmod 600 ~/.conda-smithy/github.token
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run linter tests
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
if [[ "${GITHUB_HEAD_REF}" != "" ]]; then
branch="${GITHUB_HEAD_REF}"
else
branch="${GITHUB_REF_NAME}"
fi
version=$(python -c "import conda_forge_webservices; print(conda_forge_webservices.__version__.replace('+', '.'))")
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${version}"
cd tests
pytest -n 4 -vvs --branch=${branch} test_live_linter.py
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
live-tests-version-update:
name: live-tests-version-update
runs-on: "ubuntu-latest"
needs:
- check
- tests
- docker-build
concurrency:
group: ${{ github.event.pull_request.head.repo.fork != 'true' && 'live-tests-version-update' || format('{0}-{1}', github.workflow, github.ref) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: generate token
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
mkdir -p ~/.conda-smithy/
echo $GH_TOKEN > ~/.conda-smithy/github.token
chmod 600 ~/.conda-smithy/github.token
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run version tests
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
if [[ "${GITHUB_HEAD_REF}" != "" ]]; then
branch="${GITHUB_HEAD_REF}"
else
branch="${GITHUB_REF_NAME}"
fi
version=$(python -c "import conda_forge_webservices; print(conda_forge_webservices.__version__.replace('+', '.'))")
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${version}"
cd tests
pytest -vvs --branch=${branch} test_live_version_update.py
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
live-tests-automerge:
name: live-tests-automerge
runs-on: "ubuntu-latest"
needs:
- check
- tests
concurrency:
group: ${{ github.event.pull_request.head.repo.fork != 'true' && 'live-tests-automerge' || format('{0}-{1}', github.workflow, github.ref) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: generate token
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
pip install --no-deps --no-build-isolation -e .
- name: run automerge tests
if: ${{ needs.check.outputs.skip-check != 'true' && !github.event.pull_request.head.repo.fork }}
run: |
if [[ "${GITHUB_HEAD_REF}" != "" ]]; then
branch="${GITHUB_HEAD_REF}"
else
branch="${GITHUB_REF_NAME}"
fi
cd tests
pytest -vvs --branch=${branch} test_live_automerge.py
env:
GHA_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GH_TOKEN: ${{ steps.generate_token.outputs.token }}