define __new__ instead of __init__ #54
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: tests | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| name: "Python Tests" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: "1.83.0" # MSRV | |
| override: true | |
| components: clippy | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| - run: pip install poetry | |
| - run: poetry install | |
| - run: poetry run maturin develop | |
| - run: poetry run pytest | |
| ## Run the `taskchampion-py` crate's tests with various combinations of features. | |
| features: | |
| strategy: | |
| matrix: | |
| features: | |
| - "" | |
| - "sync" | |
| - "server-sync" | |
| - "server-gcp" | |
| name: "taskchampion-py ${{ matrix.features == '' && 'with no features' || format('with features {0}', matrix.features) }}" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: "1.83.0" # MSRV | |
| override: true | |
| components: clippy | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| - run: pip install poetry | |
| - run: poetry install | |
| - run: poetry run maturin develop --no-default-features --features "${{ matrix.features }}" | |
| - run: poetry run pytest |