Skip to content

Commit

Permalink
General CI bump (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Jan 12, 2024
1 parent aada50a commit 05e8288
Show file tree
Hide file tree
Showing 21 changed files with 146 additions and 420 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,46 @@ name: Documentation

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: ['*']

defaults:
run:
shell: bash -l {0}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
uses: actions/checkout@v4

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
condarc-file: ci/condarc
use-mamba: true
python-version: '3.9'
environment-file: ci/requirements-docs.yml
activate-environment: pyscenarios-docs

- name: Show conda options
run: conda config --show

- name: conda info
shell: bash -l {0}
run: conda info

- name: conda list
shell: bash -l {0}
run: conda list

- name: Install
shell: bash -l {0}
run: python -m pip install --no-deps -e .

- name: Build docs
shell: bash -l {0}
run: sphinx-build -n -j auto -b html -d build/doctrees doc build/html

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: pyscenarios-docs
path: build/html
8 changes: 4 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Linting

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: ['*']

Expand All @@ -11,6 +11,6 @@ jobs:
name: pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0
54 changes: 0 additions & 54 deletions .github/workflows/pytest-minimal.yml

This file was deleted.

35 changes: 15 additions & 20 deletions .github/workflows/pytest-nojit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,50 @@ name: Test without JIT

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: ['*']

defaults:
run:
shell: bash -l {0}

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
condarc-file: ci/condarc
use-mamba: true
python-version: '3.10'
environment-file: ci/requirements.yml
python-version: '3.11'
environment-file: ci/requirements-latest.yml
activate-environment: pyscenarios

- name: Show conda options
run: conda config --show

- name: conda info
shell: bash -l {0}
run: conda info

- name: conda list
shell: bash -l {0}
run: conda list

- name: Install
shell: bash -l {0}
run: python -m pip install --no-deps -e .

- name: pytest
shell: bash -l {0}
env:
NUMBA_DISABLE_JIT: 1
run: |
coverage run -m pytest -v
coverage xml
run: py.test --verbose --cov=pyscenarios --cov-report=xml

- name: codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
59 changes: 42 additions & 17 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,80 @@
name: Test latest
name: Test

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: ['*']

defaults:
run:
shell: bash -l {0}

jobs:
build:
name: ${{ matrix.python-version }} ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu]
python-version: ['3.8', '3.9', '3.10', '3.11']
requirements: [latest]
include:
# Test on macos and windows (first and last version of python only)
- os: macos
python-version: '3.8'
requirements: latest
- os: macos
python-version: '3.11'
requirements: latest
- os: windows
python-version: '3.8'
requirements: latest
- os: windows
python-version: '3.11'
requirements: latest
# Test on minimal requirements
- os: ubuntu
python-version: '3.8'
requirements: minimal
- os: macos
python-version: '3.8'
requirements: minimal
- os: windows
python-version: '3.8'
requirements: minimal

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
condarc-file: ci/condarc
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/requirements.yml
environment-file: ci/requirements-${{ matrix.requirements }}.yml
activate-environment: pyscenarios

- name: Show conda options
run: conda config --show

- name: conda info
shell: bash -l {0}
run: conda info

- name: conda list
shell: bash -l {0}
run: conda list

- name: Install
shell: bash -l {0}
run: python -m pip install --no-deps -e .

- name: pytest
shell: bash -l {0}
run: |
coverage run -m pytest -v
coverage xml
run: py.test --verbose --cov=pyscenarios --cov-report=xml

- name: codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.py[cod]
*.pyc
__pycache__

# C extensions
Expand All @@ -23,11 +23,12 @@ lib64
pip-log.txt

# Unit test / coverage reports
.coverage
.coverage*
coverage.xml
.tox
nosetests.xml
.cache
.mypy_cache
.mypy_cache/
.ropeproject/
.tags*
.testmon*
Expand Down Expand Up @@ -57,6 +58,5 @@ Icon*
.ipynb_checkpoints

doc/_build
_build
htmlcov
coverage.xml
Untitled.ipynb
htmlcov/
29 changes: 14 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
repos:
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
name: absolufy-imports
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
language_version: python3
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- --py38-plus
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
language_version: python3
exclude: versioneer.py
args:
- --target-version=py38
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
language_version: python3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
8 changes: 6 additions & 2 deletions readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: mambaforge-22.9

conda:
environment: ci/requirements-docs.yml
environment: ci/requirements-docs.yml

python:
version: 3.8
install:
- method: pip
path: .
Expand Down

0 comments on commit 05e8288

Please sign in to comment.