Skip to content

Fix regex used to detect an attribute that must be convert to a variable #188

Fix regex used to detect an attribute that must be convert to a variable

Fix regex used to detect an attribute that must be convert to a variable #188

Workflow file for this run

name: Tests
on: [push]
jobs:
build:
env:
SPEASY_AMDA_USERNAME: ${{ secrets.SPEASY_AMDA_USERNAME }}
SPEASY_AMDA_PASSWORD: ${{ secrets.SPEASY_AMDA_PASSWORD }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r requirements_dev.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
if: matrix.python-version != '3.10' || matrix.os != 'ubuntu-latest'
env:
SPEASY_CORE_HTTP_REWRITE_RULES: '{"https://thisserver_does_not_exists.lpp.polytechnique.fr/pub/":"http://sciqlop.lpp.polytechnique.fr/cdaweb-data/pub/"}'
run: |
pip install pytest pytest-cov sphinx pandoc
pip install -r docs/requirements.txt
pytest
- name: Test with pytest (coverage + long tests)
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
env:
SPEASY_AMDA_MAX_CHUNK_SIZE_DAYS: "25"
SPEASY_LONG_TESTS: ""
SPEASY_INVENTORY_TESTS: ""
SPEASY_CORE_HTTP_REWRITE_RULES: '{"https://thisserver_does_not_exists.lpp.polytechnique.fr/pub/":"http://sciqlop.lpp.polytechnique.fr/cdaweb-data/pub/"}'
run: |
sudo apt update && sudo apt install -y texlive pandoc
pip install pytest pytest-cov sphinx pandoc
pip install -r docs/requirements.txt
pytest --cov=./ -cov-config=.coveragerc --cov-report=xml
make doctest
- name: Check that release process is not broken
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }}
run: |
pip install build wheel twine
python -m build .
twine check dist/*
twine upload --repository testpypi --skip-existing dist/*
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true