|
83 | 83 | strategy:
|
84 | 84 | fail-fast: true
|
85 | 85 | matrix:
|
86 |
| - python-version: ["3.8", "3.9", "3.10", "3.11"] # "3.10" add back after pyeapi new release. |
| 86 | + python-version: ["3.8", "3.11"] |
87 | 87 | runs-on: "ubuntu-20.04"
|
88 | 88 | env:
|
89 | 89 | PYTHON_VER: "${{ matrix.python-version }}"
|
@@ -114,49 +114,48 @@ jobs:
|
114 | 114 | - "pydocstyle"
|
115 | 115 | - "flake8"
|
116 | 116 | - "yamllint"
|
117 |
| - # TODO: Re-enable after initial pylint issue is completed. https://github.com/networktocode/pyntc/issues/249 |
118 |
| - # pylint: |
119 |
| - # runs-on: "ubuntu-20.04" |
120 |
| - # strategy: |
121 |
| - # fail-fast: true |
122 |
| - # matrix: |
123 |
| - # python-version: ["3.7"] |
124 |
| - # env: |
125 |
| - # PYTHON_VER: "${{ matrix.python-version }}" |
126 |
| - # steps: |
127 |
| - # - name: "Check out repository code" |
128 |
| - # uses: "actions/checkout@v2" |
129 |
| - # - name: "Setup environment" |
130 |
| - # uses: "networktocode/gh-action-setup-poetry-environment@v2" |
131 |
| - # - name: "Get image version" |
132 |
| - # run: "echo IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" |
133 |
| - # - name: "Set up Docker Buildx" |
134 |
| - # id: "buildx" |
135 |
| - # uses: "docker/setup-buildx-action@v1" |
136 |
| - # - name: "Load the image from cache" |
137 |
| - # uses: "docker/build-push-action@v2" |
138 |
| - # with: |
139 |
| - # builder: "${{ steps.buildx.outputs.name }}" |
140 |
| - # context: "./" |
141 |
| - # push: false |
142 |
| - # load: true |
143 |
| - # tags: "${{ env.IMAGE_NAME }}:${{ env.IMAGE_VER }}" |
144 |
| - # file: "./Dockerfile" |
145 |
| - # cache-from: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}" |
146 |
| - # cache-to: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}" |
147 |
| - # build-args: | |
148 |
| - # PYTHON_VER=${{ env.PYTHON_VER }} |
149 |
| - # - name: "Debug: Show docker images" |
150 |
| - # run: "docker image ls" |
151 |
| - # - name: "Linting: Pylint" |
152 |
| - # run: "poetry run invoke pylint" |
153 |
| - # needs: |
154 |
| - # - "build" |
| 117 | + pylint: |
| 118 | + runs-on: "ubuntu-20.04" |
| 119 | + strategy: |
| 120 | + fail-fast: true |
| 121 | + matrix: |
| 122 | + python-version: ["3.8"] |
| 123 | + env: |
| 124 | + PYTHON_VER: "${{ matrix.python-version }}" |
| 125 | + steps: |
| 126 | + - name: "Check out repository code" |
| 127 | + uses: "actions/checkout@v2" |
| 128 | + - name: "Setup environment" |
| 129 | + uses: "networktocode/gh-action-setup-poetry-environment@v2" |
| 130 | + - name: "Get image version" |
| 131 | + run: "echo IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV" |
| 132 | + - name: "Set up Docker Buildx" |
| 133 | + id: "buildx" |
| 134 | + uses: "docker/setup-buildx-action@v1" |
| 135 | + - name: "Load the image from cache" |
| 136 | + uses: "docker/build-push-action@v2" |
| 137 | + with: |
| 138 | + builder: "${{ steps.buildx.outputs.name }}" |
| 139 | + context: "./" |
| 140 | + push: false |
| 141 | + load: true |
| 142 | + tags: "${{ env.IMAGE_NAME }}:${{ env.IMAGE_VER }}" |
| 143 | + file: "./Dockerfile" |
| 144 | + cache-from: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}" |
| 145 | + cache-to: "type=gha,scope=${{ env.IMAGE_NAME }}-${{ env.IMAGE_VER }}-py${{ matrix.python-version }}" |
| 146 | + build-args: | |
| 147 | + PYTHON_VER=${{ env.PYTHON_VER }} |
| 148 | + - name: "Debug: Show docker images" |
| 149 | + run: "docker image ls" |
| 150 | + - name: "Linting: Pylint" |
| 151 | + run: "poetry run invoke pylint" |
| 152 | + needs: |
| 153 | + - "build" |
155 | 154 | pytest:
|
156 | 155 | strategy:
|
157 | 156 | fail-fast: true
|
158 | 157 | matrix:
|
159 |
| - python-version: ["3.8", "3.9", "3.10", "3.11"] |
| 158 | + python-version: ["3.8", "3.11"] |
160 | 159 | runs-on: "ubuntu-20.04"
|
161 | 160 | env:
|
162 | 161 | PYTHON_VER: "${{ matrix.python-version }}"
|
@@ -188,8 +187,7 @@ jobs:
|
188 | 187 | - name: "Run Tests"
|
189 | 188 | run: "poetry run invoke pytest"
|
190 | 189 | needs:
|
191 |
| - # Remove everything but pylint once pylint is passing. |
192 |
| - # - "pylint" |
| 190 | + - "pylint" |
193 | 191 | - "bandit"
|
194 | 192 | - "pydocstyle"
|
195 | 193 | - "flake8"
|
|
0 commit comments