Welcome to mirror list, hosted at ThFree Co, Russian Federation.

python2_tests.yml « workflows « .github - github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aabb9ae8953b675b06f1d6737631a376a83624ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Run tests on Python 2

on:
  workflow_dispatch:
  workflow_call:
  push:
    paths:
      - '**.py'
  pull_request:
    paths:
      - '**.py'

jobs:
  test_python2:
    name: Test with Python 2 on Ubuntu 20.04
    runs-on: ubuntu-20.04

    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v2
        with:
          path: nanopb
          fetch-depth: "0"

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install python-protobuf protobuf-compiler scons python-is-python2

      - name: Run tests with Python 2
        run: |
          cd nanopb
          export GENPATH=$(bash -c 'printf %q "$(pwd)/generator/protoc-gen-nanopb-py2"')
          cd tests
          scons PYTHON="/usr/bin/python2" PROTOC="/usr/bin/protoc" PROTOCFLAGS="--plugin=protoc-gen-nanopb=$GENPATH"