pinning meteostat < 2.0.0 (not equal) #70
This file contains hidden or 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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, dev ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| schedule: | |
| # Run weekly on Monday at 6 AM UTC | |
| - cron: '0 6 * * 1' | |
| jobs: | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint with flake8 | |
| run: | | |
| # Stop the build if there are Python syntax errors or undefined names | |
| flake8 lib/ tests/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Exit-zero treats all errors as warnings | |
| flake8 lib/ tests/ --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics | |
| - name: Check formatting with black | |
| run: | | |
| black --check lib/ tests/ | |
| - name: Type check with mypy | |
| run: | | |
| mypy lib/ || true # Don't fail on type errors for now | |
| - name: Run tests | |
| run: | | |
| pytest tests/ -v --cov=lib --cov-branch --cov-report=xml --cov-report=term-missing -m "not integration" | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'macos-latest' && matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| verbose: true | |
| integration-test: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| # Only run integration tests on dev branch or manual trigger | |
| if: github.ref == 'refs/heads/dev' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run integration tests | |
| run: | | |
| pytest tests/ -v -m integration --maxfail=3 | |
| continue-on-error: true # Don't fail if API is temporarily down |