-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5fb127
commit e2dac97
Showing
1 changed file
with
45 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
stages: | ||
- test | ||
- prod | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
cache: npm | ||
steps: | ||
- name: Installing sls framework packages | ||
run: npm install -g serverless \ | ||
npm install serverless-python-requirements \ | ||
npm install serverless-wsgi \ | ||
npm install serverless-domain-manager | ||
- name: Login in AWS | ||
run: export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ | ||
export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY | ||
- name: Deploying prod on -AWS- | ||
run: serverless deploy | ||
# test: | ||
# image: python:3.8.1-alpine | ||
# stage: test | ||
# script: | ||
# - pip install pylint | ||
# - pip install --no-cache-dir -r requirements.txt | ||
# - pylint --rcfile=.pylintrc pybus.py pybus_test.py | ||
# except: | ||
# - master | ||
|
||
test: | ||
image: python:3.8.1-alpine | ||
stage: test | ||
script: | ||
- pip install pylint | ||
- pip install --no-cache-dir -r requirements.txt | ||
- pylint --rcfile=.pylintrc pybus.py pybus_test.py | ||
except: | ||
- master | ||
|
||
production: | ||
image: python:3.8.1-alpine | ||
stage: prod | ||
script: | ||
- echo "Installing sls framework packages" | ||
- apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/main/ nodejs=8.9.3-r1 | ||
- npm install -g serverless | ||
- npm install serverless-python-requirements | ||
- npm install serverless-wsgi | ||
- npm install serverless-domain-manager | ||
- echo "Deploying prod on -AWS-" | ||
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID | ||
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY | ||
- serverless deploy | ||
only: | ||
- master | ||
# production: | ||
# image: python:3.8.1-alpine | ||
# stage: prod | ||
# script: | ||
# - echo "Installing sls framework packages" | ||
# - apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/main/ nodejs=8.9.3-r1 | ||
# - npm install -g serverless | ||
# - npm install serverless-python-requirements | ||
# - npm install serverless-wsgi | ||
# - npm install serverless-domain-manager | ||
# - echo "Deploying prod on -AWS-" | ||
# - export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID | ||
# - export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY | ||
# - serverless deploy | ||
# only: | ||
# - master |