forked from conda-incubator/conda-recipe-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (82 loc) · 2.85 KB
/
integration_tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
on:
push:
branches:
- main
pull_request:
workflow_dispatch: # Trigger workflow manually from GitHub UI
name: Integration Tests
jobs:
## Integration tests ##
integration-rattler:
# validate recipe files.
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 # Make sure this path matches where the files are located
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"
- 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 one recipe at a time using paths from the JSON
for recipe in "test_data/recipes_v0/anaconda_recipes_01/types-toml-feedstock/recipe/meta.yaml"; do
echo "Processing recipe: $recipe"
conda-recipe-manager \
convert -t -m ${{ matrix.convert-success }} -o recipe.yaml $recipe \
| tee logs/convert.log
conda-recipe-manager \
rattler-bulk-build -t -m ${{ matrix.rattler-success }} $recipe \
| tee logs/rbb.log
done
- 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}