Skip to content

Update anaconda.md

Update anaconda.md #80

Workflow file for this run

name: Test Learning Path
on: pull_request
jobs:
Test-Pull-Request:
runs-on: arm-linux-runner
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
path: ${{ steps.vars.outputs.branch-name }}
- name: Get all changed markdown files
id: changed-markdown-files
uses: tj-actions/changed-files@v44
with:
files: |
**.md
- name: Install dependencies
if: steps.changed-markdown-files.outputs.any_changed == 'true'
run: pip install -r tools/requirements.txt
- name: Run test suite for all changed files
id: run-suite
if: steps.changed-markdown-files.outputs.any_changed == 'true'
# Run the test suite
run: |
set -o pipefail; ./.github/workflows/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt
- name: Parse test suite errors
id: test-suite-state
if: success()
# Catch any missed errors if running multiple tests
run: |
cat test-lp-output.txt | grep -q 'Tests failed in test suite' && echo "TEST_SUITE_ERRORS=true" >> "$GITHUB_ENV" \
|| echo "TEST_SUITE_ERRORS=false" >> "$GITHUB_ENV"
- name: Test condition
if: env.TEST_SUITE_ERRORS == 'true' && success()
run: |
echo "Test failures detected in test suite, check the output in earlier steps"
exit 1
- name: Parse test maintenance off
id: maintenance-state
if: success()
# Check if maintenance is turned off
run: |
cat test-lp-output.txt | grep -q 'maintenance is turned off' && echo "MAINTENANCE=off" >> "$GITHUB_ENV" \
|| echo "MAINTENANCE=on" >> "$GITHUB_ENV"
- name: Test condition
if: env.MAINTENANCE == 'off' && success()
# Skip opening a PR if tests have not been run
run: echo "Maintenance is turned off for one or more files"
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: success() && env.MAINTENANCE == 'on'
with:
name: stats_current_test_info.yml
path: data/stats_current_test_info.yml
- name: Checkout tools repo
uses: actions/checkout@v4
if: success() && env.MAINTENANCE == 'on'
with:
repository: ArmDeveloperEcosystem/native-runner-arm-learning-paths
path: native-runner-arm-learning-paths
- name: Download a single artifact
uses: actions/download-artifact@v4
if: success() && env.MAINTENANCE == 'on'
with:
name: stats_current_test_info.yml
path: data/stats_current_test_info.yml
- name: Add changes to main
if: success() && env.MAINTENANCE == 'on'
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add data/stats_current_test_info.yml
git commit -m "Update stats_current_test_info.yml"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
if: success() && env.MAINTENANCE == 'on'
with:
commit-message: update stats_current_test_info.yml
title: Update stats_current_test_info.yml
body: |
Update test result file with recent run
Auto-generated by create-pull-request: https://github.com/peter-evans/create-pull-request
base: ${{ github.repository }}
branch: main