Skip to content

Commit

Permalink
Merge pull request #1 from SPF-OST/expressions
Browse files Browse the repository at this point in the history
Expressions
  • Loading branch information
zuckerruebe authored May 2, 2024
2 parents add1375 + c6395ad commit beec23e
Show file tree
Hide file tree
Showing 30 changed files with 1,570 additions and 332 deletions.
53 changes: 46 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,66 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
python-version: [3.12]

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install -r dev-requirements.txt
pip install -r requirements/dev.txt
- name: Static type checking with mypy
run: mypy --show-error-codes src test

- name: Lint with pylint
run: pylint test/test_trnsys_dck_parser src/trnsys_dck_parser setup.py
run: pylint test/test_trnsys_dck_parser src/trnsys_dck_parser

- name: Get current time
id: current_time
run: echo "current_time=$(date -Iseconds)" >> "$GITHUB_OUTPUT"

- name: Restore and save (at end of workflow) pytest-benchmark data
id: pytest-benchmark
uses: actions/cache@v4
with:
path: .benchmarks
key: pytest-benchmark-${{steps.current_time.outputs.current_time}}
restore-keys:
pytest-benchmark-

- name: Test with pytest
run: pytest test --cov=src --cov-report=html:test-results/coverage --cov-report=term --html=test-results/report/report.html
shell: bash {0}
run: |
compare_args=$(test -d .benchmarks && echo \
--benchmark-compare \
--benchmark-compare-fail=mean:5% \
--benchmark-histogram='test-results/benchmark/histogram')
pytest test \
--cov=src \
--cov-report=html:test-results/coverage \
--cov-report=term \
--cov-report=lcov:test-results/coverage.lcov \
--html=test-results/report/report.html \
--benchmark-autosave \
$compare_args
- name: Post coverage report to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: test-results/coverage.lcov

- name: Upload test results and coverage reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-results-and-coverage-report
path: test-results
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.idea/
venv/
venv*/

build/
src/trnsys_dck_parser.egg-info/
**/__pycache__/

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
[![Coverage Status](https://coveralls.io/github/SPF-OST/trnsys-dck-parser/badge.svg?branch=main)](https://coveralls.io/github/SPF-OST/trnsys-dck-parser?branch=main)

# trnsys-dck-parser
97 changes: 0 additions & 97 deletions dev-requirements.txt

This file was deleted.

Loading

0 comments on commit beec23e

Please sign in to comment.