Skip to content

remove subdir, platform, arch from individual package records #407

remove subdir, platform, arch from individual package records

remove subdir, platform, arch from individual package records #407

Workflow file for this run

name: Tests
on:
# NOTE: github.event context is push payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
push:
branches:
- main
- feature/**
# NOTE: github.event context is pull_request payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
pull_request:
concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to main will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
name: conda-index (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channels: defaults
show-channel-urls: true
environment-file: tests/environment.yml
# does the fact that conda-index is now a conda-build dependency cause
# issues here, since an older version will already be installed?
- name: Source Scripts
run: |
pip install -e .[test]
conda info
pytest --cov
analyze:
name: Analyze test results
needs: [test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
- name: Upload combined test results
# provides one downloadable archive of all .coverage/test-report.xml files
# of all matrix runs for further analysis.
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-results-${{ github.sha }}-all
path: test-results-${{ github.sha }}-*
retention-days: 90 # default: 90
- name: Test Summary
uses: test-summary/action@v2
with:
paths: ./test-results-${{ github.sha }}-**/test-report*.xml
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
build:
name: Canary Build
needs: [analyze]
# only build canary build if
# - prior steps succeeded,
# - this is the main repo, and
# - we are on the main (or feature) branch
if: >-
success()
&& !github.event.repository.fork
&& (
github.ref_name == 'main'
|| startsWith(github.ref_name, 'feature/')
)
runs-on: ubuntu-latest
steps:
# Clean checkout of specific git ref needed for package metadata version
# which needs env vars GIT_DESCRIBE_TAG and GIT_BUILD_STR:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0
- name: Create and upload canary build
uses: conda/actions/canary-release@v22.10.0
with:
package-name: ${{ github.event.repository.name }}
subdir: noarch
anaconda-org-channel: conda-canary
anaconda-org-label: ${{ github.ref_name == 'main' && 'dev' || github.ref_name }}
anaconda-org-token: ${{ secrets.ANACONDA_ORG_CONDA_CANARY_TOKEN }}