Skip to content

Commit 5341d67

Browse files
authored
ci: fix Python integration tests workflow (#132)
* ci: fix Python integration tests workflow * improve comments * improve names
1 parent 260a213 commit 5341d67

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/python_integration_tests.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ concurrency:
1515
jobs:
1616
# Job to run integration tests from the main repository.
1717
integration_tests_on_main:
18-
name: Integration tests (main repository)
18+
name: Integration tests
1919
runs-on: ubuntu-latest
20-
# If PR is from the main repository or it is a push to master.
20+
# Run this only for PRs from the main repository or for pushes to master. Skip otherwise.
2121
if: github.event.pull_request.head.repo.owner.login == 'apify' || github.ref == 'refs/heads/master'
2222
strategy:
2323
matrix:
24-
python-version: ["3.9", "3.12"] # Oldest and newest supported Python versions.
25-
max-parallel: 1 # No parallel tests to avoid exceeding API limits.
24+
python-version: ["3.9", "3.12"] # Oldest and newest supported Python versions.
25+
max-parallel: 1 # No parallel tests to avoid exceeding API limits.
2626

2727
steps:
2828
- name: Checkout repository
@@ -45,10 +45,10 @@ jobs:
4545

4646
# Job to request approval before running integration tests for PRs from forks.
4747
integration_tests_on_fork_approval:
48-
name: Approve integration tests for fork PR
48+
name: Approve integration tests for PRs from forks
4949
runs-on: ubuntu-latest
50-
# If the PR is from a fork.
51-
if: github.event.pull_request.head.repo.owner.login != 'apify'
50+
# Run this only for PRs from forks. Skip otherwise.
51+
if: github.event.pull_request.head.repo.owner.login != 'apify' && github.ref != 'refs/heads/master'
5252
environment:
5353
name: fork-pr-integration-tests
5454
url: ${{ github.event.pull_request.html_url }}
@@ -58,15 +58,15 @@ jobs:
5858

5959
# Job to run integration tests for PRs from forks, only after manual approval.
6060
integration_tests_on_fork:
61-
name: Integration tests (fork after approval)
61+
name: Integration tests for PRs from forks
6262
needs: integration_tests_on_fork_approval
63-
# If the PR is from a fork.
64-
if: github.event.pull_request.head.repo.owner.login != 'apify'
63+
# Run this only for PRs from forks. Skip otherwise.
64+
if: github.event.pull_request.head.repo.owner.login != 'apify' && github.ref != 'refs/heads/master'
6565
runs-on: ubuntu-latest
6666
strategy:
6767
matrix:
68-
python-version: ["3.9", "3.12"] # Oldest and newest supported Python versions.
69-
max-parallel: 1 # No parallel tests to avoid overshooting limits.
68+
python-version: ["3.9", "3.12"] # Oldest and newest supported Python versions.
69+
max-parallel: 1 # No parallel tests to avoid overshooting limits.
7070

7171
steps:
7272
- name: Checkout repository

0 commit comments

Comments
 (0)