Skip to content

Get pico-go stubs

Get pico-go stubs #350

Workflow file for this run

# This will attempt to retrieve and add/update the hand coded stubs from cpwood/Pico-Stub
name: Get pico-go stubs
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 5" # Run every Friday at 01:00
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
# job prepare sets everything up
get-pico-stubs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
continue-on-error: true
# Most scripts will be run from the stubs repo, set that as default
defaults:
run:
shell: bash
working-directory: ${{github.workspace}}/micropython-stubs
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
######################################
# Check out repos side-by-side:
# josverl/micropython-stubs
# cpwood/Pico-Stub
######################################
- name: Checkout stubs repo
uses: actions/checkout@v3
with:
repository: josverl/micropython-stubs
path: micropython-stubs
- name: Checkout stubber repo
uses: actions/checkout@v3
with:
repository: josverl/micropython-stubber
path: micropython-stubber
# simplify processing using symlink
- name: create symlink for all_stubs
working-directory: ${{github.workspace}}/micropython-stubber
run: |
ln -s ${{github.workspace}}/micropython-stubs/stubs all-stubs --force
# integrate stubs from this repo
- name: Checkout Pico-Stub repo
uses: actions/checkout@v3
with:
repository: cpwood/Pico-Stub
path: Pico-Stub
######################################
# This is where the actual work starts
######################################
- name: add/update Pico-Stub/dist/pylance/*.*
working-directory: ${{github.workspace}}
shell: pwsh
run: |
copy-item ./Pico-Stub/dist/pylance/*.* ./micropython-stubs/stubs/micropython-pico-go -Recurse -Force
copy-item ./Pico-Stub/LICENSE ./micropython-stubs/stubs/micropython-pico-go/LICENSE
# Todo: add manifest.json
# - name: Update stubs with .pyi ${{ matrix.version }}
# run: |
# python ./src/update_pyi.py
# - name: Update Documentation
# working-directory: ${{github.workspace}}/micropython-stubber
# shell: pwsh
# run: |
# scripts/update_docs.ps1
- name: commit
uses: ./.github/actions/commit
with:
message: "add/update Pico-Stub modules"