Skip to content

Commit

Permalink
PETOSS-529 - Create Github Workflow for Python SDK to Build, Test and…
Browse files Browse the repository at this point in the history
… Lint
  • Loading branch information
Vignesh Kennadi committed Sep 6, 2024
1 parent 200e72b commit 6cc3f5c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: PHP Build, Lint

on:
push:

jobs:
build-test-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout xero-python repo
uses: actions/checkout@v4
with:
repository: XeroAPI/xero-python
path: xero-python

- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt -r requirements/dev.txt
working-directory: xero-python

- name: Run Flake8
run: |
flake8 xero_python
working-directory: xero-python

- name: Build package
run: python setup.py sdist
working-directory: xero-python

# - name: Run Test
# run: |
# source venv/bin/activate
# pip install -r requirements/test.txt
# pytest -v
# working-directory: xero-python

0 comments on commit 6cc3f5c

Please sign in to comment.