Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI (master)

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Upgrade pip and install build tools
run: python -m pip install --upgrade pip build

- name: Install package and test deps
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"

- name: Black format check
continue-on-error: true
run: python -m black --check .

- name: Lint
continue-on-error: true
run: flake8 .

- name: Unit tests
run: |
python -m pytest tests -q -m "not integration"

- name: Integration tests (real API)
if: matrix.python-version == '3.11'
env:
SPLUS_USERNAME: ${{ secrets.SPLUS_USERNAME }}
SPLUS_PASSWORD: ${{ secrets.SPLUS_PASSWORD }}
SPLUS_SERVER_IP: ${{ secrets.SPLUS_SERVER_IP }}
run: |
python -m pytest tests/test_core_integration.py -q

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ splus_data.egg-info/

site/

dev/
dev/
.vscode
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
{ name = "Gustavo Schwarz", email = "gustavo.b.schwarz@gmail.com" }
]
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { text = "Apache-2.0" }
keywords = ["S-PLUS", "astronomy", "catalogs", "FITS"]
classifiers = [
Expand Down Expand Up @@ -44,4 +44,12 @@ spd_scubesml = "splusdata.scubes.scripts:scubesml"
where = ["."]

# python -m build
# python -m twine upload dist/*
# python -m twine upload dist/*

[project.optional-dependencies]
test = [
"pytest>=7.0,<8",
"flake8>=6.0",
"black>=23.3,<24.0; python_version == '3.8'",
"black>=24.0; python_version >= '3.9'"
]
Loading
Loading