Skip to content

Commit 6cc3f5c

Browse files
author
Vignesh Kennadi
committed
PETOSS-529 - Create Github Workflow for Python SDK to Build, Test and Lint
1 parent 200e72b commit 6cc3f5c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PHP Build, Lint
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-test-lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout xero-python repo
12+
uses: actions/checkout@v4
13+
with:
14+
repository: XeroAPI/xero-python
15+
path: xero-python
16+
17+
- name: Set up Python environment
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.8'
21+
cache: 'pip'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m venv venv
26+
source venv/bin/activate
27+
pip install --upgrade pip
28+
pip install -r requirements.txt -r requirements/dev.txt
29+
working-directory: xero-python
30+
31+
- name: Run Flake8
32+
run: |
33+
flake8 xero_python
34+
working-directory: xero-python
35+
36+
- name: Build package
37+
run: python setup.py sdist
38+
working-directory: xero-python
39+
40+
# - name: Run Test
41+
# run: |
42+
# source venv/bin/activate
43+
# pip install -r requirements/test.txt
44+
# pytest -v
45+
# working-directory: xero-python

0 commit comments

Comments
 (0)