-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (48 loc) · 1.68 KB
/
Copy pathpython-flow.yml
File metadata and controls
52 lines (48 loc) · 1.68 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
name: Python package
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
testing:
runs-on: ubuntu-latest
env:
CDK_DEFAULT_REGION: eu-west-1
ZONE_DOMAIN_NAME: 'datwit.com'
TEST_HOST_NAME: 'testsitedeployment.datwit.com'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Install dependencies
run: |
npm install -g aws-cdk@next
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
make dev
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 YbfConstructs tests --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 YbfConstructs tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# env:
# CDK_DEFAULT_ACCOUNT: ${{ secrets.CDK_DEFAULT_ACCOUNT }}
# TESTSITE_CERTIFICATE: ${{ secrets.TESTSITE_CERTIFICATE }}
# run: |
# cd tests && cdk deploy --require-approval never && cd ..
# make test
# cd tests && cdk destroy -f && cd ..