Fix truncated timepoint addition bug #78
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 45 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | |
coverage: [false] | |
include: | |
# Modify existing configurations: | |
- os: ubuntu-latest | |
python-version: '3.9' | |
coverage: false | |
tz: 'XXX-05:30' # UTC+05:30 | |
# Add new configurations: | |
- os: ubuntu-latest | |
python-version: '3.9' | |
coverage: true | |
- os: macos-latest | |
python-version: '3.9' | |
coverage: false | |
env: | |
PYTEST_ADDOPTS: -n 5 -m 'slow or not slow' --color=yes | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: | | |
pip install --upgrade pip setuptools | |
pip install -e .[all] | |
pip install pytest-xdist | |
- name: Style test | |
run: flake8 metomi/isodatetime | |
- name: Run tests | |
env: | |
TZ: ${{ matrix.tz }} | |
run: | | |
if ${{ matrix.coverage }}; then | |
PYTEST_ADDOPTS="${PYTEST_ADDOPTS} --cov=metomi/isodatetime" | |
fi | |
pytest | |
- name: Coverage report | |
if: matrix.coverage | |
run: | | |
coverage xml | |
coverage report | |
- name: Codecov upload | |
if: matrix.coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
name: '${{ matrix.os }} py-${{ matrix.python-version }}' | |
fail_ci_if_error: false |