name: .mpy file format and tools

on:
  push:
  pull_request:
    paths:
      - '.github/workflows/*.yml'
      - 'examples/**'
      - 'mpy-cross/**'
      - 'py/**'
      - 'tests/**'
      - 'tools/**'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v6
    - name: Install packages
      run: tools/ci.sh mpy_format_setup
    - name: Test mpy-tool.py
      run: tools/ci.sh mpy_format_test
    - name: Test mpy-cross debug emitter
      run: tools/ci.sh mpy_cross_debug_emitter
