1name: Run tests using packages from older Linux distributions 2 3on: 4 workflow_dispatch: 5 workflow_call: 6 push: 7 paths: 8 - '**.py' 9 pull_request: 10 paths: 11 - '**.py' 12 13jobs: 14 test_python2: 15 name: Test with Python 3 on Ubuntu 20.04 16 runs-on: ubuntu-20.04 17 18 steps: 19 - name: Check out code from GitHub 20 uses: actions/checkout@v4 21 with: 22 path: nanopb 23 fetch-depth: "0" 24 25 - name: Install dependencies from apt-get 26 run: | 27 # Deliberately avoid using new protobuf from pip 28 sudo apt-get update 29 sudo apt-get install python3-protobuf protobuf-compiler scons python-is-python3 30 31 - name: Run tests with Python 3 32 run: | 33 cd nanopb/tests 34 scons 35 36