Skip to content

Commit

Permalink
adjusting workflow for memory issue
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul-050 committed Nov 25, 2024
1 parent 92ea063 commit 0035fbb
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 99 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,102 @@ jobs:
echo -e "Integration Report:\n\`\`\`json\n" >> ${GITHUB_STEP_SUMMARY}
cat report.json >> ${GITHUB_STEP_SUMMARY}
echo -e "\n\`\`\`" >> ${GITHUB_STEP_SUMMARY}
on:
push:
branches:
- main
pull_request:
workflow_dispatch: # Trigger workflow manually from GitHub UI

name: Integration Tests

jobs:
## Integration tests ##
integration-rattler:
runs-on: ubuntu-latest
timeout-minutes: 45
name: Test on ${{ matrix.test-directory }}
strategy:
fail-fast: false
matrix:
test-directory:
- anaconda_recipes_01
include:
- test-directory: anaconda_recipes_01
convert-success: 0.90
rattler-success: 0.75
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: conda-incubator/conda-recipe-manager-test-data
path: test_data
sparse-checkout: |
recipes_v0/anaconda_recipes_01
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"

# Load the allow-list from the integration_build_test_config.json
- name: Load Allow-List
run: |
echo "Loading allow-list from integration_build_test_config.json"
ALLOW_LIST=$(cat integration_build_test_config.json | jq -r '.v0_test_files[]')
echo "$ALLOW_LIST" > allow_list.txt
- name: Check directory structure
run: |
echo "Listing directory structure:"
ls -R test_data/ # Debugging step to list the directory structure
- name: Convert recipes and full 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=""
# Process each recipe from the allow list
while read -r recipe; do
echo "Processing recipe: $recipe"
conda-recipe-manager \
convert -t -m ${{ matrix.convert-success }} -o recipe.yaml "test_data/$recipe" \
| tee -a logs/convert.log
conda-recipe-manager \
rattler-bulk-build -t -m ${{ matrix.rattler-success }} "test_data/$recipe" \
| tee -a logs/rbb.log
done < allow_list.txt
- uses: actions/upload-artifact@v4
with:
name: integration-logs-${{ matrix.test-directory }}
path: logs/*.log

integration-final-results:
runs-on: ubuntu-latest
name: Integration Testing Final Report
needs: [integration-rattler]
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"
- name: Make artifact directory
run: mkdir -p logs
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: logs/
- 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}
105 changes: 6 additions & 99 deletions integration_build_test_config.json
Original file line number Diff line number Diff line change
@@ -1,99 +1,6 @@
on:
push:
branches:
- main
pull_request:
workflow_dispatch: # Trigger workflow manually from GitHub UI

name: Integration Tests

jobs:
## Integration tests ##
integration-rattler:
runs-on: ubuntu-latest
timeout-minutes: 45
name: Test on ${{ matrix.test-directory }}
strategy:
fail-fast: false
matrix:
test-directory:
- anaconda_recipes_01
include:
- test-directory: anaconda_recipes_01
convert-success: 0.90
rattler-success: 0.75
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: conda-incubator/conda-recipe-manager-test-data
path: test_data
sparse-checkout: |
recipes_v0/anaconda_recipes_01
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"

# Load the allow-list from the integration_build_test_config.json
- name: Load Allow-List
run: |
echo "Loading allow-list from integration_build_test_config.json"
ALLOW_LIST=$(cat integration_build_test_config.json | jq -r '.v0_test_files[]')
echo "$ALLOW_LIST" > allow_list.txt

- name: Check directory structure
run: |
echo "Listing directory structure:"
ls -R test_data/ # Debugging step to list the directory structure

- name: Convert recipes and full 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=""

# Process each recipe from the allow list
while read -r recipe; do
echo "Processing recipe: $recipe"
conda-recipe-manager \
convert -t -m ${{ matrix.convert-success }} -o recipe.yaml "test_data/$recipe" \
| tee -a logs/convert.log
conda-recipe-manager \
rattler-bulk-build -t -m ${{ matrix.rattler-success }} "test_data/$recipe" \
| tee -a logs/rbb.log
done < allow_list.txt

- uses: actions/upload-artifact@v4
with:
name: integration-logs-${{ matrix.test-directory }}
path: logs/*.log

integration-final-results:
runs-on: ubuntu-latest
name: Integration Testing Final Report
needs: [integration-rattler]
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"
- name: Make artifact directory
run: mkdir -p logs
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: logs/
- 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}
{
"v0_test_files": [
"recipes_v0/anaconda_recipes_01/types-toml-feedstock/recipe/meta.yaml"
]
}

0 comments on commit 0035fbb

Please sign in to comment.