Skip to content

Updated RPi Pico tests #47

Updated RPi Pico tests

Updated RPi Pico tests #47

name: Generate and Publish Test Report Website
on: push
jobs:
generate-site:
runs-on: ubuntu-latest
steps:
# Check out this repo and the Mbed submodule
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: Install Python dependencies
run: |
pip install -r Test-Result-Evaluator/requirements.txt
- name: Install Graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Run website generator
run: |
export PYTHONPATH=$(pwd)/CI-Shield-Tests/mbed-os/tools/python
cd Test-Result-Evaluator
# Create database
python -m test_result_evaluator.create_database ../CI-Shield-Tests/mbed-os mbed_tests.db
# Import test runs (static data for now)
python -m test_result_evaluator.import_test_runs mbed_tests.db demo-test-configs
# Generate website
python -m test_result_evaluator.generate_results mbed_tests.db generated-site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: Test-Result-Evaluator/generated-site
# Note: The below is copied almost verbatim from the example job from the deploy-pages action.
# See https://github.com/actions/deploy-pages
deploy-site:
# Add a dependency to the build job
needs: generate-site
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action