From 369350ec6d297dc0c216e5ff8f67e79791cb416f Mon Sep 17 00:00:00 2001 From: Kevin Hannon Date: Thu, 19 Jan 2023 09:40:35 -0500 Subject: [PATCH] action fix for setup-protoc (#2041) * action fix for setup-protoc * fix for ardinuio * fix --- .../workflows/airflow-operator-release-to-pypi.yml | 6 ++++++ .github/workflows/airflow-operator.yml | 6 ++++++ .github/workflows/coverage.yml | 5 +++-- .github/workflows/python-client-release-to-pypi.yml | 6 ++++++ .github/workflows/python-client.yml | 2 ++ .github/workflows/python-tests/action.yml | 13 +++++++++---- 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/.github/workflows/airflow-operator-release-to-pypi.yml b/.github/workflows/airflow-operator-release-to-pypi.yml index 3d57f17f817..ce6d438a4c2 100644 --- a/.github/workflows/airflow-operator-release-to-pypi.yml +++ b/.github/workflows/airflow-operator-release-to-pypi.yml @@ -12,12 +12,18 @@ jobs: steps: - uses: actions/checkout@v2 - uses: ./.github/workflows/go-setup + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: '3.17.3' + repo-token: ${{ secrets.GITHUB_TOKEN }} - run: make airflow-operator - uses: ./.github/workflows/python-tests with: python-version: '3.8' tox-env: 'py38' path: third_party/airflow + github-token: ${{secrets.GITHUB_TOKEN}} - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.github/workflows/airflow-operator.yml b/.github/workflows/airflow-operator.yml index 048908ecea0..20aef7316ff 100644 --- a/.github/workflows/airflow-operator.yml +++ b/.github/workflows/airflow-operator.yml @@ -55,9 +55,15 @@ jobs: steps: - uses: actions/checkout@v2 - uses: ./.github/workflows/go-setup + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: '3.17.3' + repo-token: ${{ secrets.GITHUB_TOKEN }} - run: make airflow-operator - uses: ./.github/workflows/python-tests with: python-version: ${{ matrix.python }} tox-env: ${{ matrix.tox-env }} path: third_party/airflow + github-token: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index daa55dd578a..237bd1c0f0f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -45,6 +45,7 @@ jobs: python-version: '3.10' tox-env: 'py310' path: 'client/python' + github-token: ${{secrets.GITHUB_TOKEN}} - name: Upload Coverage to codecov (./client/python) uses: codecov/codecov-action@v3 @@ -75,9 +76,9 @@ jobs: python-version: '3.10' tox-env: 'py310' path: 'third_party/airflow' - + github-token: ${{secrets.GITHUB_TOKEN}} - name: Upload Coverage to codecov (./third_party/airflow) uses: codecov/codecov-action@v3 with: files: 'third_party/airflow/coverage.xml' - flags: airflow-operator \ No newline at end of file + flags: airflow-operator diff --git a/.github/workflows/python-client-release-to-pypi.yml b/.github/workflows/python-client-release-to-pypi.yml index 6d86c72b5b1..cc12aa1d267 100644 --- a/.github/workflows/python-client-release-to-pypi.yml +++ b/.github/workflows/python-client-release-to-pypi.yml @@ -12,11 +12,17 @@ jobs: steps: - uses: actions/checkout@v2 - uses: ./.github/workflows/go-setup + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: '3.17.3' + repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/workflows/python-tests with: python-version: '3.8' tox-env: 'py38' path: 'client/python' + github-token: ${{secrets.GITHUB_TOKEN}} - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.github/workflows/python-client.yml b/.github/workflows/python-client.yml index b058f8e74b4..091a62a10c8 100644 --- a/.github/workflows/python-client.yml +++ b/.github/workflows/python-client.yml @@ -48,6 +48,8 @@ jobs: python-version: ${{ matrix.python }} tox-env: ${{ matrix.tox-env }} path: 'client/python' + github-token: ${{secrets.GITHUB_TOKEN}} + python-client-integration-tests: runs-on: ubuntu-22.04 strategy: diff --git a/.github/workflows/python-tests/action.yml b/.github/workflows/python-tests/action.yml index 71b98841ca5..d9f68202c43 100644 --- a/.github/workflows/python-tests/action.yml +++ b/.github/workflows/python-tests/action.yml @@ -14,6 +14,10 @@ inputs: description: "Tox environment to use for running the tests" required: true type: string + github-token: + description: "Token for authenticated github requests" + required: true + type: string runs: using: "composite" @@ -21,13 +25,14 @@ runs: - uses: actions/setup-python@v2 with: python-version: ${{ inputs.python-version }} + # Tox to run tests; build to build the wheel after tests pass + - run: pip install tox==3.27.1 build twine + shell: bash - name: Install Protoc uses: arduino/setup-protoc@v1 with: version: '3.17.3' - # Tox to run tests; build to build the wheel after tests pass - - run: pip install tox==3.27.1 build twine - shell: bash + repo-token: ${{ inputs.github-token }} # Generate the proto files for python, required for later steps - run: make python shell: bash @@ -48,4 +53,4 @@ runs: python -m build --wheel twine check dist/* shell: bash - working-directory: ${{ inputs.path }} \ No newline at end of file + working-directory: ${{ inputs.path }}