forked from serverless/serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 2.03 KB
/
ci-python.yml
File metadata and controls
65 lines (55 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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'
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-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@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
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'
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: '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 }}