Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: georgik/esp-wrover-kit-embedded-wizard-wokwi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: wokwi/esp-wrover-kit-embedded-wizard-wokwi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 4 commits
  • 1 file changed
  • 1 contributor

Commits on May 25, 2023

  1. Copy the full SHA
    3d3ec78 View commit details

Commits on Aug 6, 2023

  1. Copy the full SHA
    6b4a6ab View commit details

Commits on Feb 27, 2024

  1. ci: remove unneeded rotation

    urish authored Feb 27, 2024
    Copy the full SHA
    e61a54b View commit details

Commits on Jun 12, 2024

  1. ci: upgrade action dependencies

    urish committed Jun 12, 2024
    Copy the full SHA
    2429d31 View commit details
Showing with 74 additions and 0 deletions.
  1. +74 −0 .github/workflows/ci.yml
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Simulate with Wokwi + Screen Shot

on:
workflow_dispatch:
push:

jobs:
simulate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download prebuilt firmware
run: |
mkdir build
cd build
wget "https://github.com/georgik/esp-wrover-kit-embedded-wizard-wokwi/releases/download/v0.1/EmbeddedWizard-ESP-WROVER-KIT-merged.bin"
- name: Test with Wokwi
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
expect_text: 'Embedded Wizard'

- name: Simulate & take a screen shot
run: |
mkdir public
wokwi-cli --timeout 3000 --timeout-exit-code 0 --screenshot-part "lcd1" --screenshot-time 3000 --screenshot-file "public/screenshot.png" "${GITHUB_WORKSPACE}"
env:
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}

- name: Publish screen shot as artifact
uses: actions/upload-artifact@v4
with:
name: screenshot
path: public/screenshot.png

- name: Create an index.html file to preview screen shot
run:
echo "<html><body><img src='screenshot.png'></body></html>" > public/index.html

- name: Upload screen shot to GitHub pages
uses: actions/upload-pages-artifact@v3
with:
path: 'public'

deploy:
needs: simulate

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write
id-token: write

# 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

- name: Display screen shot in action summary
run: |
PAGE_URL=${{ steps.deployment.outputs.page_url }}
CACHE_BUSTER=$(date +%s)
cat << EOF >> $GITHUB_STEP_SUMMARY
# LCD screen shot (simulated with Wokwi)
![LCD Screen shot](${PAGE_URL}screenshot.png?cache_buster=$CACHE_BUSTER)
EOF