Skip to content

Commit

Permalink
github/actions: Update (#57) (#58)
Browse files Browse the repository at this point in the history
* github/actions: Update (#57)

* Add GitHub action to lint + test

* Try removing coverage command

* github/actions: Update

* Update and rename python-package.yml to test.yml

* Update test.yml

* Update test.yml

* Update test.yml

* github: Update

* github: Remove 3.14, not available yet
  • Loading branch information
echarrod authored Nov 4, 2024
1 parent b4dbaf1 commit fc7835f
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 17 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.12", "3.13" ]

steps:

- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .[test]
- name: Test with pytest
run: |
pytest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ dist/
.eggs/
.coverage
.idea/
/env/
/.DS_Store
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing

## Clone
```bash
git clone https://github.com/luno/luno-python.git
```
## Create Virtual env
```bash
cd luno-python
python -m venv env
source env/bin/activate
```

## Install Dependencies
```bash
python -m pip install --upgrade pip setuptools wheel
pip install -e '.[test]'
```

## Run Tests
```bash
pytest
```
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
test=pytest

[tool:pytest]
addopts=--cov=luno_python tests/
addopts=tests/
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
keywords='Luno API Bitcoin Ethereum',
test_suite='tests',
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-cov', 'requests_mock']
extras_require={
"test": ["pytest", "pytest-cov", "requests_mock"]
},
)

0 comments on commit fc7835f

Please sign in to comment.