-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 2.4 KB
/
python-app.yml
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
66
67
68
69
70
71
72
73
74
75
76
name: Python application
on:
push:
branches: [ "adding_tests" ]
pull_request:
branches: [ "adding_tests" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ec2 creation config
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.SMALL_TEST_GITHUB }}
filename: "small_test_github.yaml"
is-executable: false
working-directory: "./test_configs"
- name: aws creation
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.PERSONAL_TESTING }}
filename: "personal_testing"
is-executable: false
working-directory: "./test_configs"
- name: update
run: sudo apt-get update
- name: install awscli
run: sudo apt-get install -y awscli
- name: aws creds
run: sudo aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} &&
sudo aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} &&
sudo aws configure set default.region us-west-2 &&
sudo aws configure set --profile personal
- name: look at
run: sudo cat /root/.aws/credentials
# - name: Set up Python 3.10
# uses: actions/setup-python@v3
# with:
# python-version: "3.10"
# - name: Install pip dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install flake8
# python -m pip install poetry==1.4.1
# - name: Configure poetry
# run: |
# python -m poetry config virtualenvs.in-project true
# - name: Install poetry dependencies
# run: |
# python -m poetry install
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 easy_boto3 --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 easy_boto3 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# python -m poetry run pytest tests/test_ec2.py -s