From be989cb9f5af6767d79f610dad21e407256bcd20 Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 15 Nov 2024 16:39:46 +0100 Subject: [PATCH 1/5] Add httpbin_url input to python unit tests workflow --- .github/workflows/python_unit_tests.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/python_unit_tests.yaml b/.github/workflows/python_unit_tests.yaml index a1c268b..d371cc3 100644 --- a/.github/workflows/python_unit_tests.yaml +++ b/.github/workflows/python_unit_tests.yaml @@ -2,6 +2,12 @@ name: Unit tests on: workflow_call: + inputs: + httpbin_url: + required: false + type: string + default: 'https://httpbin.org' + description: Used to set the HTTPBIN_URL environment variable jobs: unit_tests: @@ -11,6 +17,8 @@ jobs: os: ["ubuntu-latest", "windows-latest"] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # All supported Python versions. runs-on: ${{ matrix.os }} + environment: + HTTPBIN_URL: ${{ inputs.httpbin_url }} steps: - name: Checkout repository From c7c18756736b698b313381246829d6cfae720b7a Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 15 Nov 2024 16:43:56 +0100 Subject: [PATCH 2/5] Do not fail fast --- .github/workflows/python_unit_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_unit_tests.yaml b/.github/workflows/python_unit_tests.yaml index d371cc3..93fdf5a 100644 --- a/.github/workflows/python_unit_tests.yaml +++ b/.github/workflows/python_unit_tests.yaml @@ -13,6 +13,7 @@ jobs: unit_tests: name: Unit tests strategy: + fail-fast: false matrix: os: ["ubuntu-latest", "windows-latest"] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # All supported Python versions. From 0586a2ce34d29204296b254cfef87256991bc3a4 Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 15 Nov 2024 16:45:35 +0100 Subject: [PATCH 3/5] Fix --- .github/workflows/python_integration_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_integration_tests.yaml b/.github/workflows/python_integration_tests.yaml index bd51cce..d3eedfe 100644 --- a/.github/workflows/python_integration_tests.yaml +++ b/.github/workflows/python_integration_tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest # Run this only for PRs from forks. Skip otherwise. if: github.event.pull_request.head.repo.owner.login != 'apify' && github.ref != 'refs/heads/master' - environment: + env: name: fork-pr-integration-tests url: ${{ github.event.pull_request.html_url }} steps: From f22dc4f6abd88eebda1cac6120ae6f70f8348f9e Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 15 Nov 2024 16:48:26 +0100 Subject: [PATCH 4/5] Actually fix --- .github/workflows/python_integration_tests.yaml | 2 +- .github/workflows/python_unit_tests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_integration_tests.yaml b/.github/workflows/python_integration_tests.yaml index d3eedfe..bd51cce 100644 --- a/.github/workflows/python_integration_tests.yaml +++ b/.github/workflows/python_integration_tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest # Run this only for PRs from forks. Skip otherwise. if: github.event.pull_request.head.repo.owner.login != 'apify' && github.ref != 'refs/heads/master' - env: + environment: name: fork-pr-integration-tests url: ${{ github.event.pull_request.html_url }} steps: diff --git a/.github/workflows/python_unit_tests.yaml b/.github/workflows/python_unit_tests.yaml index 93fdf5a..6771714 100644 --- a/.github/workflows/python_unit_tests.yaml +++ b/.github/workflows/python_unit_tests.yaml @@ -18,7 +18,7 @@ jobs: os: ["ubuntu-latest", "windows-latest"] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # All supported Python versions. runs-on: ${{ matrix.os }} - environment: + env: HTTPBIN_URL: ${{ inputs.httpbin_url }} steps: From 2c91c4e630f6249a0d43c8e5a9aa3380eef23a6f Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 15 Nov 2024 17:01:41 +0100 Subject: [PATCH 5/5] Use secrets instead of inputs --- .github/workflows/python_unit_tests.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_unit_tests.yaml b/.github/workflows/python_unit_tests.yaml index 6771714..3b2555f 100644 --- a/.github/workflows/python_unit_tests.yaml +++ b/.github/workflows/python_unit_tests.yaml @@ -2,11 +2,9 @@ name: Unit tests on: workflow_call: - inputs: + secrets: httpbin_url: required: false - type: string - default: 'https://httpbin.org' description: Used to set the HTTPBIN_URL environment variable jobs: @@ -19,7 +17,7 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # All supported Python versions. runs-on: ${{ matrix.os }} env: - HTTPBIN_URL: ${{ inputs.httpbin_url }} + HTTPBIN_URL: ${{ secrets.httpbin_url || 'https://httpbin.org' }} steps: - name: Checkout repository