Skip to content
Merged
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
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jobs:
consistency:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -8,22 +8,16 @@ jobs:
with:
cache: pip
python-version: ${{ matrix.python-version }}
- run: pip install copier
- run: copier copy -r HEAD -f . .
- run: git diff
- run: git status --porcelain
- run: |
if [[ -n `git status --porcelain` ]]; then
exit 1
fi
- run: make dev-lint
- run: make lint
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
lint:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -32,16 +26,20 @@ jobs:
with:
cache: pip
python-version: ${{ matrix.python-version }}
- run: make dev-lint
- run: make lint
- run: make dev-tests
- run: make tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.python-version }}
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
tests:
consistency:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -50,12 +48,14 @@ jobs:
with:
cache: pip
python-version: ${{ matrix.python-version }}
- run: make dev-tests
- run: make tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.python-version }}
- run: pip install copier
- run: copier copy -r HEAD -f . .
- run: git diff
- run: git status --porcelain
- run: |
if [[ -n `git status --porcelain` ]]; then
exit 1
fi
strategy:
matrix:
python-version:
Expand Down
65 changes: 45 additions & 20 deletions .github/workflows/ci.yml.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% from pathjoin("includes", "version_compare.jinja") import version_between -%}
jobs:
{%- if project_name == "Serious Scaffold Python" %}
consistency:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -9,23 +9,24 @@ jobs:
with:
cache: pip
python-version: {{ '${{ matrix.python-version }}' }}
- run: pip install copier
- run: copier copy -r HEAD -f . .
- run: git diff
- run: git status --porcelain
- run: |
if [[ -n `git status --porcelain` ]]; then
exit 1
fi
- run: make dev-lint
- run: make lint
strategy:
matrix:
python-version:
{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %}
- '3.8'
{%- endif %}
{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %}
- '3.9'
{%- endif %}
{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %}
- '3.10'
{%- endif %}
{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %}
- '3.11'
{%- endif %}
lint:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -34,16 +35,29 @@ jobs:
with:
cache: pip
python-version: {{ '${{ matrix.python-version }}' }}
- run: make dev-lint
- run: make lint
- run: make dev-tests
- run: make tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: {{ '${{ matrix.python-version }}' }}
strategy:
matrix:
python-version:
{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %}
- '3.8'
{%- endif %}
{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %}
- '3.9'
{%- endif %}
{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %}
- '3.10'
{%- endif %}
{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %}
- '3.11'
tests:
{%- endif %}
{%- if project_name == "Serious Scaffold Python" %}
consistency:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -52,19 +66,30 @@ jobs:
with:
cache: pip
python-version: {{ '${{ matrix.python-version }}' }}
- run: make dev-tests
- run: make tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: {{ '${{ matrix.python-version }}' }}
- run: pip install copier
- run: copier copy -r HEAD -f . .
- run: git diff
- run: git status --porcelain
- run: |
if [[ -n `git status --porcelain` ]]; then
exit 1
fi
strategy:
matrix:
python-version:
{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %}
- '3.8'
{%- endif %}
{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %}
- '3.9'
{%- endif %}
{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %}
- '3.10'
{%- endif %}
{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %}
- '3.11'
{%- endif %}
{%- endif %}
name: CI
on:
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.DS_Store
.copier-answers.yml
Pipfile
public

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions .gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.copier-answers.yml
{%- endif %}
Pipfile
public

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
37 changes: 25 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,47 @@ stages:
- lint_test
- build_release
lint:
image: python:3.11
interruptible: true
image: python:$PYTHON_VERSION
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
- main
- merge_requests
parallel:
matrix:
- PYTHON_VERSION:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
script:
- env | sort
- make dev-lint
- make lint
stage: lint_test
test:
tests:
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
image: python:3.11
interruptible: true
image: python:$PYTHON_VERSION
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
- main
- merge_requests
parallel:
matrix:
- PYTHON_VERSION:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
script:
- env | sort
- make dev-tests
- make tests
stage: lint_test
package:
image: python:3.11
interruptible: true
only:
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
Expand All @@ -46,15 +58,16 @@ pages:
except:
refs:
- schedules
image: python:3.11
interruptible: true
only:
changes:
- docs/**/*
refs:
- master
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
- main
script:
- make dev-docs
- make docs
stage: build_release
default:
image: python:3.11
interruptible: true
54 changes: 42 additions & 12 deletions .gitlab-ci.yml.jinja
Original file line number Diff line number Diff line change
@@ -1,36 +1,65 @@
{% from pathjoin("includes", "version_compare.jinja") import version_between -%}
stages:
- lint_test
- build_release
lint:
image: {{ ci_image }}
interruptible: true
image: python:$PYTHON_VERSION
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
- main
- merge_requests
parallel:
matrix:
- PYTHON_VERSION:
{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %}
- '3.8'
{%- endif %}
{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %}
- '3.9'
{%- endif %}
{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %}
- '3.10'
{%- endif %}
{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %}
- '3.11'
{%- endif %}
script:
- env | sort
- make dev-lint
- make lint
stage: lint_test
test:
tests:
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
image: {{ ci_image }}
interruptible: true
image: python:$PYTHON_VERSION
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
- main
- merge_requests
parallel:
matrix:
- PYTHON_VERSION:
{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %}
- '3.8'
{%- endif %}
{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %}
- '3.9'
{%- endif %}
{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %}
- '3.10'
{%- endif %}
{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %}
- '3.11'
{%- endif %}
script:
- env | sort
- make dev-tests
- make tests
stage: lint_test
package:
image: {{ ci_image }}
interruptible: true
only:
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
Expand All @@ -46,15 +75,16 @@ pages:
except:
refs:
- schedules
image: {{ ci_image }}
interruptible: true
only:
changes:
- docs/**/*
refs:
- master
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
- main
script:
- make dev-docs
- make docs
stage: build_release
default:
image: python:{{ default_python_version }}
interruptible: true
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ repos:
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
- id: no-commit-to-branch
stages:
- stages:
- push
id: no-commit-to-branch
- args:
- '--autofix'
id: pretty-format-json
Expand Down
Loading