diff --git a/.github/workflows/build_and_deploy_docs.yaml b/.github/workflows/build_and_deploy_docs.yaml index e34a428a..3e7dc146 100644 --- a/.github/workflows/build_and_deploy_docs.yaml +++ b/.github/workflows/build_and_deploy_docs.yaml @@ -55,7 +55,7 @@ jobs: - name: Install Python dependencies run: | - pipx install --python ${{ matrix.python-version }} poetry + pipx install --python ${{ env.PYTHON_VERSION }} poetry make install-dev - name: Build generated API reference diff --git a/.github/workflows/run_code_checks.yaml b/.github/workflows/run_code_checks.yaml index 00a381fe..1515a820 100644 --- a/.github/workflows/run_code_checks.yaml +++ b/.github/workflows/run_code_checks.yaml @@ -2,26 +2,29 @@ name: Run code checks on: # Trigger code checks on opening a new pull request. - pull_request_target: + # Secrets are only made available to the integration tests job, with a manual approval + # step required for PRs from forks. This prevents their potential exposure. + pull_request: - # Do not trigger code checks on push to the master branch, as they will be triggered - # by the release workflow. - - # Trigger code checks on workflow call (e.g. from run release workflow). - workflow_call: + # Trigger code checks on pushing to the master branch. + push: + branches: + - master + tags-ignore: + - "**" jobs: lint_check: name: Lint check - uses: apify/workflows/.github/workflows/python/lint_check.yaml + uses: apify/workflows/.github/workflows/python_lint_check.yaml@main type_check: name: Type check - uses: apify/workflows/.github/workflows/python/type_check.yaml + uses: apify/workflows/.github/workflows/python_type_check.yaml@main unit_tests: name: Unit tests - uses: apify/workflows/.github/workflows/python/unit_tests.yaml + uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main # TODO: remove this once https://github.com/apify/apify-sdk-python/issues/241 is resolved changelog_entry_check: @@ -35,9 +38,10 @@ jobs: docs_check: name: Docs check - uses: apify/workflows/.github/workflows/python/docs_check.yaml + uses: apify/workflows/.github/workflows/python_docs_check.yaml@main integration_tests: name: Integration tests - uses: apify/workflows/.github/workflows/python/integration_tests.yaml + needs: [lint_check, type_check, unit_tests] + uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main secrets: inherit diff --git a/.github/workflows/run_release.yaml b/.github/workflows/run_release.yaml index c2759794..45626a7a 100644 --- a/.github/workflows/run_release.yaml +++ b/.github/workflows/run_release.yaml @@ -1,16 +1,18 @@ name: Run release on: - # Push to master will publish a beta version + # Push to master will publish a beta version. push: branches: - master tags-ignore: - "**" - # A release via GitHub releases will publish a stable version + + # A release via GitHub releases will publish a stable version. release: types: [published] - # Workflow dispatch will publish whatever you choose + + # Workflow dispatch will publish whatever you choose. workflow_dispatch: inputs: release_type: @@ -37,17 +39,17 @@ jobs: lint_check: name: Lint check needs: [should_release] - uses: apify/workflows/.github/workflows/python/lint_check.yaml + uses: apify/workflows/.github/workflows/python_lint_check.yaml@main type_check: name: Type check needs: [should_release] - uses: apify/workflows/.github/workflows/python/type_check.yaml + uses: apify/workflows/.github/workflows/python_type_check.yaml@main unit_tests: name: Unit tests needs: [should_release] - uses: apify/workflows/.github/workflows/python/unit_tests.yaml + uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main # TODO: remove this once https://github.com/apify/apify-sdk-python/issues/241 is resolved changelog_entry_check: @@ -64,7 +66,7 @@ jobs: integration_tests: name: Integration tests needs: [should_release] - uses: apify/workflows/.github/workflows/python/integration_tests.yaml + uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main secrets: inherit publish_to_pypi: @@ -98,7 +100,7 @@ jobs: - name: Install Python dependencies run: | - pipx install --python ${{ matrix.python-version }} poetry + pipx install --python ${{ env.PYTHON_VERSION }} poetry make install-dev - # Determine if this is a prerelease or latest release diff --git a/Makefile b/Makefile index b51c1572..d3a97e21 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ build-api-reference: cd website && poetry run ./build_api_reference.sh build-docs: build-api-reference - cd website && yarn && yarn build + cd website && npm clean-install && npm run build run-docs: build-api-reference cd website && npm clean-install && npm run start