Skip to content

K8s: test-gateway addition to tox #3602

K8s: test-gateway addition to tox

K8s: test-gateway addition to tox #3602

name: PR Tests - Linting
on:
workflow_call:
pull_request:
branches:
- "**"
concurrency:
group: linting-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }}
cancel-in-progress: true
jobs:
pr-tests-linting:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install pip packages
run: |
python -m pip install --upgrade --user pip tox
- name: Get pip cache dir
id: pip-cache
shell: bash
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
# TODO: change cache key from setup.cfg to something more general
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-py${{ matrix.python-version }}-
- uses: pre-commit/[email protected]
- name: Check Protocol Version
run: |
tox -e syft.protocol.check