Skip to content

Commit 6df3784

Browse files
committed
ci: Add wait_for_checks and concurrency group
1 parent b3ae5a9 commit 6df3784

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

.github/workflows/pre_release.yaml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
# Or it can be triggered manually.
1212
workflow_dispatch:
1313

14+
concurrency:
15+
group: release
16+
cancel-in-progress: false
17+
1418
jobs:
1519
release_metadata:
1620
if: "!startsWith(github.event.head_commit.message, 'docs') && !startsWith(github.event.head_commit.message, 'ci') && startsWith(github.repository, 'apify/')"
@@ -28,44 +32,39 @@ jobs:
2832
release_type: prerelease
2933
existing_changelog_path: CHANGELOG.md
3034

31-
lint_check:
32-
name: Lint check
33-
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
34-
with:
35-
python-versions: '["3.10", "3.11", "3.12", "3.13"]'
36-
37-
type_check:
38-
name: Type check
39-
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
40-
with:
41-
python-versions: '["3.10", "3.11", "3.12", "3.13"]'
42-
43-
unit_tests:
44-
name: Unit tests
45-
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main
46-
with:
47-
python-versions: '["3.10", "3.11", "3.12", "3.13"]'
48-
49-
integration_tests:
50-
name: Integration tests
51-
uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main
52-
secrets: inherit
53-
with:
54-
python-versions: '["3.10", "3.13"]'
35+
# If github.ref points to a [ci skip] commit, this workflow won't run.
36+
# Otherwise, these checks will be launched from the `run_code_checks` workflow.
37+
wait_for_checks:
38+
name: Wait for code checks to pass
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: lewagon/[email protected]
42+
with:
43+
ref: ${{ github.ref }}
44+
repo-token: ${{ secrets.GITHUB_TOKEN }}
45+
check-regexp: "( check| tests)$"
46+
wait-interval: 5
5547

5648
update_changelog:
5749
name: Update changelog
58-
needs: [release_metadata, lint_check, type_check, unit_tests, integration_tests]
50+
needs: [release_metadata, wait_for_checks]
5951
uses: apify/workflows/.github/workflows/python_bump_and_update_changelog.yaml@main
6052
with:
6153
version_number: ${{ needs.release_metadata.outputs.version_number }}
6254
changelog: ${{ needs.release_metadata.outputs.changelog }}
6355
secrets:
6456
APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
6557

58+
build_and_deploy_docs:
59+
needs: [update_changelog]
60+
uses: ./.github/workflows/build_and_deploy_docs.yaml
61+
with:
62+
ref: ${{ needs.update_changelog.outputs.changelog_commitish }}
63+
secrets: inherit
64+
6665
publish_to_pypi:
6766
name: Publish to PyPI
68-
needs: [release_metadata, update_changelog]
67+
needs: [release_metadata, wait_for_checks]
6968
runs-on: ubuntu-latest
7069
permissions:
7170
contents: write

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
type: string
2222
default: ""
2323

24+
concurrency:
25+
group: release
26+
cancel-in-progress: false
27+
2428
jobs:
2529
release_metadata:
2630
name: Prepare release metadata

0 commit comments

Comments
 (0)