Skip to content

relock w/ conda-lock #2078

relock w/ conda-lock

relock w/ conda-lock #2078

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:
tests:
name: tests
runs-on: "ubuntu-latest"
concurrency:
group: ${{ github.workflow }}-tests-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: setup conda
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # v1
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: ${{ !github.event.pull_request.head.repo.fork }}
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # 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
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
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run test suite
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
runs-on: "ubuntu-latest"
concurrency:
group: ${{ github.workflow }}-docker-build-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: setup conda
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # v1
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
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: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'conda-forge/conda-forge-webservices'
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: login to docker hub
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'conda-forge/conda-forge-webservices'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
username: condaforgebot
password: ${{ secrets.CF_BOT_DH_PASSWORD }}
- name: build and push docker image
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'conda-forge/conda-forge-webservices'
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # 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:
- tests
- docker-build
concurrency:
group: ${{ github.event.pull_request.head.repo.fork != 'true' && 'live-tests-upload' || format('{0}-{1}', github.workflow, github.ref) }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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: ${{ !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ !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
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run package upload tests
if: ${{ !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 }}
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:
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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: ${{ !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ !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
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run rerender tests
if: ${{ !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:
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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: ${{ !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ !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
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run linter tests
if: ${{ !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_linter.py
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
live-tests-version-update:
name: live-tests-version-update
runs-on: "ubuntu-latest"
needs:
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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: ${{ !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ !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
pip install --no-deps --no-build-isolation -e .
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: run version tests
if: ${{ !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:
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
fetch-depth: 0
- name: setup conda
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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: ${{ !github.event.pull_request.head.repo.fork }}
id: generate_token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: install code
if: ${{ !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: ${{ !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 }}