-
Notifications
You must be signed in to change notification settings - Fork 4.3k
149 lines (137 loc) · 4.17 KB
/
common.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: main_workflow
on:
push:
branches:
- master
pull_request:
jobs:
lock_check:
defaults:
run:
working-directory: ./python
continue-on-error: False
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Pipenv install requirements and check it can be locked
run: |
pip install pipenv
pipenv --clear
time pipenv install --verbose --dev --skip-lock
time pipenv run pip install -e .[all]
time pipenv lock
time pipenv run composio --help
linter_checks:
defaults:
run:
working-directory: ./python
continue-on-error: False
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install --user --upgrade setuptools
pip install tox==4.6.3
- name: Code style check
run: |
tox -e black-check
tox -e isort-check
tox -e flake8
- name: Pylint check
run: tox -e pylint
- name: Static type check
run: tox -e mypy
test:
defaults:
run:
working-directory: ./python
continue-on-error: True
needs:
- lock_check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Install Docker Engine without containerd
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli
sudo systemctl start docker
sudo systemctl enable docker
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install --user --upgrade setuptools
pip install tox==4.6.3
- name: Unittests
run: |
COMPOSIO_API_KEY=${{ secrets.COMPOSIO_API_KEY_STAGING }} COMPOSIO_BASE_URL=${{ secrets.COMPOSIO_BASE_URL_STAGING }} tox -e unittests
- if: matrix.python-version == '3.10'
name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: SamparkAI/composio_sdk
# Needs fixing
# integration_tests:
# needs:
# - lock_check
# - linter_checks
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, macos-latest]
# python-version: ['3.9', '3.10', '3.11', '3.12']
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Set up Node.js
# uses: actions/setup-node@v2
# with:
# node-version: '20'
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Go core and run pip install
# run: pip3 install -e .
# - name: Install dependencies
# run: npm install -g pnpm && pnpm install && pnpm exec playwright install
# - name: Run tests
# run: pnpm test