Skip to content

Integration Tests

Integration Tests #34

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
name: Integration Tests
jobs:
integration-rattler:
runs-on: ubuntu-latest
timeout-minutes: 45
name: Test on Allowed Recipes
steps:
# Checkout the main repository
- uses: actions/checkout@v4
# Checkout the test data repository
- uses: actions/checkout@v4
with:
repository: conda-incubator/conda-recipe-manager-test-data
path: test_data
# Read the allow list and copy recipes
- name: Read Allow List
run: |
echo "Fetching allowed recipes from allow-list.txt"
rm -rf test_data/recipes_v0/test-recipes # Clear any existing recipes
mkdir -p test_data/recipes_v0/test-recipes
while read recipe; do
cp -r "test_data/recipes_v0/$recipe" "test_data/recipes_v0/test-recipes/" || echo "Recipe $recipe not found!"
done < allow-list.txt
# Setup environment
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"
# Convert recipes and perform a full build
- name: Convert recipes and full-build rattler-build
run: |
source $CONDA/bin/activate
conda activate conda-recipe-manager
conda install -y -c conda-forge rattler-build
mkdir -p logs
set -o pipefail
export PREFIX=""
export RECIPE_DIR=""
conda-recipe-manager \
convert -o recipe.yaml test_data/recipes_v0/test-recipes \
| tee logs/convert.log
conda-recipe-manager \
rattler-bulk-build test_data/recipes_v0/test-recipes \
| tee logs/full-build.log || true
# Generate summary of results
- name: Generate Integration Test Summary
run: |
echo "Generating summary from full-build logs..."
python scripts/summarize_results.py logs/full-build.log > summary.txt
cat summary.txt
echo -e "Integration Test Results:\n\`\`\`\n$(cat summary.txt)\n\`\`\`" >> $GITHUB_STEP_SUMMARY
# Upload logs
- uses: actions/upload-artifact@v4
with:
name: integration-logs
path: logs/*.log
integration-final-results:
runs-on: ubuntu-latest
name: Integration Testing Final Report
needs: [integration-rattler]
timeout-minutes: 5
steps:
# Checkout the main repository
- uses: actions/checkout@v4
# Setup environment
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"
# Download artifacts
- name: Download Logs
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: logs/
# Generate final integration testing report
- name: Integration Testing Report
run: |
source $CONDA/bin/activate
conda activate conda-recipe-manager
set -o pipefail
scripts/parse_ci_output.py logs/ | tee report.json
echo -e "Final Report:\n\`\`\`json\n" >> ${GITHUB_STEP_SUMMARY}
cat report.json >> ${GITHUB_STEP_SUMMARY}
echo -e "\n\`\`\`" >> ${GITHUB_STEP_SUMMARY}