-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve sanity check, add boto3-stubs sanity check
- Loading branch information
Showing
10 changed files
with
123 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: "Sanity: boto3-stubs" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
boto3_version: | ||
description: Target boto3 version | ||
required: false | ||
|
||
jobs: | ||
versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
boto3: ${{ steps.boto3.outputs.result }} | ||
botocore: ${{ steps.botocore.outputs.result }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Extract boto3 version | ||
id: boto3 | ||
uses: actions/github-script@v7 | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { getBoto3Version, setupGlobals } = require('./.github/workflows/helpers.js') | ||
setupGlobals({ core, context, fetch }) | ||
const inputBoto3Version = context.payload.inputs && context.payload.inputs.boto3_version | ||
const version = inputBoto3Version ? inputBoto3Version : await getBoto3Version() | ||
core.notice(`boto3 version ${version}`) | ||
return version | ||
- name: Extract botocore version | ||
id: botocore | ||
uses: actions/github-script@v7 | ||
env: | ||
BOTO3_VERSION: ${{ steps.boto3.outputs.result }} | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { getBotocoreVersion } = require('./.github/workflows/helpers.js') | ||
const version = getBotocoreVersion(process.env.BOTO3_VERSION) | ||
core.notice(`botocore version ${version}`) | ||
return version | ||
sanity-check: | ||
name: "Sanity: boto3-stubs" | ||
runs-on: ubuntu-latest | ||
needs: versions | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: .python-version | ||
- name: Set up uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
version: "latest" | ||
- name: Install the project | ||
run: uv sync --extra check --dev | ||
- name: Install boto3 | ||
env: | ||
BOTO3_VERSION: ${{ needs.versions.outputs.boto3 }} | ||
BOTOCORE_VERSION: ${{ needs.versions.outputs.botocore }} | ||
run: | | ||
uv pip install -U boto3==${BOTO3_VERSION} botocore==${BOTOCORE_VERSION} | ||
- name: Build main packages | ||
run: | | ||
rm -rf mypy_boto3_output/* | ||
uv run mypy_boto3_builder mypy_boto3_output \ | ||
--product boto3 \ | ||
--no-smart-version \ | ||
--download-static-stubs | ||
- name: Check s3 output | ||
run: | | ||
uv run mypy_boto3_builder mypy_boto3_output \ | ||
--product boto3-services \ | ||
--no-smart-version \ | ||
-s s3 | ||
uv run ./scripts/check_output.py -p ./mypy_boto3_output s3 | ||
- name: Build packages | ||
run: | | ||
uv run mypy_boto3_builder mypy_boto3_output \ | ||
--product boto3-services \ | ||
--no-smart-version | ||
- name: Check output | ||
run: | | ||
uv run ./scripts/check_output.py -p ./mypy_boto3_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
NAME="${1:-boto3}" | ||
echo "Opening $NAME" | ||
exit 0 | ||
|
||
SITE_PACKAGES=`uv run python -c "import sys; import os; paths = filter(lambda x: x.startswith(os.getcwd()), sys.path); print(list(paths)[0])"` | ||
echo "Site packages:" $SITE_PACKAGES | ||
code $SITE_PACKAGES/botocore | ||
echo "Site packages:" ${SITE_PACKAGES} | ||
code ${SITE_PACKAGES}/${NAME} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.