Integration Tests #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
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 -t -m 0.90 -o recipe.yaml test_data/recipes_v0/test-recipes \ | |
| tee logs/convert.log | |
conda-recipe-manager \ | |
rattler-bulk-build -t -m 0.70 test_data/recipes_v0/test-recipes \ | |
| tee logs/full-build.log | |
# 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 "Integration Report:\n\`\`\`json\n" >> ${GITHUB_STEP_SUMMARY} | |
cat report.json >> ${GITHUB_STEP_SUMMARY} | |
echo -e "\n\`\`\`" >> ${GITHUB_STEP_SUMMARY} |