Skip to content

Commit

Permalink
Merge c3dc921 into 3abfbe9
Browse files Browse the repository at this point in the history
  • Loading branch information
Deuchnord committed Apr 23, 2021
2 parents 3abfbe9 + c3dc921 commit 77098dc
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*.{yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Commit lint
name: Commit

on:
push:
Expand All @@ -8,6 +8,7 @@ on:

jobs:
commitlint:
name: Message validation
runs-on: ubuntu-latest

steps:
Expand Down
47 changes: 35 additions & 12 deletions .github/workflows/unit-tests.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests
name: Tests

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [main, features]

jobs:
legacy-unit-tests:
legacy-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -17,28 +17,32 @@ jobs:
- ubuntu-20.04
- macos-10.15
- macos-11.0
python-version:
- windows-2019
python_version:
- '3.7'
- '3.8'
- '3.9'

name: Legacy unit tests (Python ${{ matrix.python-version }} on ${{ matrix.os }})
name: Legacy tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python_version }}

- name: Install dependencies
run: |
pip install --upgrade pip pipenv
pipenv lock --pre
pipenv sync --dev
- name: Unit tests
pipenv install --dev
- name: Run legacy tests
run: |
make legacy-tests
unit-tests:
doc-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -48,27 +52,46 @@ jobs:
- ubuntu-20.04
- macos-10.15
- macos-11.0
python-version:
- windows-2019
python_version:
- '3.7'
- '3.8'
- '3.9'

name: Unit tests (Python ${{ matrix.python-version }} on ${{ matrix.os }})
name: Doc tests (Python ${{ matrix.python_version }} on ${{ matrix.os }})
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python_version }}

- name: Install dependencies
run: |
pip install --upgrade pip pipenv
pipenv lock --pre
pipenv sync --dev
- name: Unit tests
pipenv install --dev
- name: Install NumPY (Windows-specific)
if: ${{ matrix.os == 'windows-2019' }}
run: |
python -mpip install numpy
- name: Run doc tests (with coverage)
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.9' }}
run: |
make coverage-doctests
- name: Run doc tests
if: ${{ matrix.os != 'ubuntu-20.04' && matrix.python_version != '3.9' }}
run: |
make doctests
- name: Push code coverage
env:
COVERALLS_PRO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.python_version == '3.9' }}
run: |
make doctests
pipenv run coveralls --service=github
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ black:
.PHONY: tests
tests: legacy-tests doctests

doctests:
coverage-doctests:
pipenv run python3 -m coverage run tests.py

doctests:
pipenv run python3 tests.py

legacy-tests:
unset KOSMORRO_LATITUDE; \
unset KOSMORRO_LONGITUDE; \
unset KOSMORRO_TIMEZONE; \
pipenv run python3 -m coverage run -m unittest tests
pipenv run python3 -m unittest tests

.PHONY: build
build:
Expand Down

0 comments on commit 77098dc

Please sign in to comment.