Evaluation suite #6
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
name: unoptimized_tree_packing_usage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
evaluate_tree_packing_usage: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: Carnutes | |
environment-file: environment.yml | |
- name: activate conda environment | |
run: conda activate Carnutes | |
- name: evaluate tree packing usage | |
run: python -m tests.evaluate_unoptimized_tree_selection | |
- name: Read RMSE result | |
id: read-rmse | |
shell: bash | |
run: | | |
if [ -f rmse_result.txt ]; then | |
rmse=$(cat rmse_result.txt) | |
echo "rmse=$rmse" >> $GITHUB_ENV | |
else | |
echo "rmse=0" >> $GITHUB_ENV | |
fi | |
- name: Read tree usage result | |
id: read-tree-usage | |
shell: bash | |
run: | | |
if [ -f tree_usage_result.txt ]; then | |
tree_usage=$(cat tree_usage_result.txt) | |
echo "tree_usage=$tree_usage" >> $GITHUB_ENV | |
else | |
echo "tree_usage=0" >> $GITHUB_ENV | |
fi | |
- name: Create badge for RMSE | |
id: create-badge-rmse | |
run: | | |
echo "![RMSE](https://img.shields.io/badge/RMSE-${{ env.rmse }}-brightgreen)" > badge.md | |
- name: Create badge for tree usage | |
id: create-badge-tree-usage | |
run: | | |
echo "![Tree Usage](https://img.shields.io/badge/Tree_Usage-${{ env.tree_usage }}-brightgreen)" > badge.md | |
- name: Update README | |
run: | | |
sed -i "s/RMSE: .*/RMSE:${{ env.rmse }}/" README.md | |
sed -i "s/Tree Usage: .*/Tree Usage: ${{ env.tree_usage }}/" README.md |