Skip to content

fix(python): add zip path normalization test and Windows CI #56

fix(python): add zip path normalization test and Windows CI

fix(python): add zip path normalization test and Windows CI #56

Workflow file for this run

name: 'CI: Python Requirements'
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- '.github/workflows/ci-python.yml'
- 'packages/serverless/lib/plugins/python/**'
- 'packages/sf-core/tests/python/**'
jobs:
test-python:
name: 'Test: Python Requirements (${{ matrix.os }})'
if: ${{ !github.event.pull_request.draft }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, gh-windows-latest]
steps:
- name: 'Checkout Code'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Setup: Node.js'
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24.x
cache: npm
- name: 'Setup: AWS Credentials'
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
with:
role-to-assume: arn:aws:iam::762003938904:role/GithubActionsDeploymentRole
aws-region: us-east-1
- name: 'Setup: Python'
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.13
- name: 'Install: Python Tools'
run: |
python -m pip install --upgrade pip
python -m pip install pipenv poetry uv && poetry self add poetry-plugin-export
- name: 'Install: Dependencies'
run: npm ci
- name: 'Setup: Link Framework CLI (Unix)'
if: runner.os != 'Windows'
run: |
chmod +x packages/sf-core/bin/sf-core.js
mkdir -p .github/bin
ln -sf "${{ github.workspace }}/packages/sf-core/bin/sf-core.js" \
"${{ github.workspace }}/.github/bin/sls"
echo "${{ github.workspace }}/.github/bin" >> $GITHUB_PATH
- name: 'Setup: Link Framework CLI (Windows)'
if: runner.os == 'Windows'
run: |
node .github/setup-sls-cmd.cjs
echo "${{ github.workspace }}\.github\bin" >> $env:GITHUB_PATH
- name: 'Test: Python Requirements'
run: |
npm run test:python -w packages/sf-core
env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY_DEV }}
SLS_AWS_SDK: 3
SERVERLESS_PLATFORM_STAGE: dev
TEST_STAGE: pr-${{ github.event.pull_request.user.login }}