Update time_series.rs #1273
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 | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| docs_only: ${{ steps.derive.outputs.docs_only }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dorny/paths-filter@v4 | |
| id: filter | |
| with: | |
| filters: | | |
| docs: | |
| - 'docs/**' | |
| - '**/*.md' | |
| - 'mkdocs.yml' | |
| - '.markdownlint*' | |
| code: | |
| - 'src/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'tests/**' | |
| - ".github/workflows/**" | |
| - "scripts/**" | |
| - id: derive | |
| run: | | |
| if [[ "${{ steps.filter.outputs.docs }}" == "true" && "${{ steps.filter.outputs.code }}" != "true" ]]; then | |
| echo "docs_only=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "docs_only=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| check: | |
| needs: changes | |
| if: needs.changes.outputs.docs_only != 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: actions/checkout@v5 | |
| - name: Check formatting | |
| run: cargo fmt -- --check --config group_imports=StdExternalCrate | |
| - name: Clippy | |
| run: cargo clippy --tests -- -D warnings | |
| - name: Detect Cargo.lock changes | |
| run: git diff-index --quiet HEAD -- | |
| - name: markdownlint | |
| uses: DavidAnson/markdownlint-cli2-action@v23 | |
| with: | |
| globs: '**/*.md' | |
| test: | |
| needs: changes | |
| if: needs.changes.outputs.docs_only != 'true' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: actions/checkout@v5 | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - uses: actions/checkout@v5 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate coverage report | |
| run: cargo llvm-cov --workspace --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| files: lcov.info | |
| fail_ci_if_error: true |