Add status in readme (#92) #13
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: | |
| pull_request: | |
| branches: | |
| - "**" | |
| push: | |
| branches: | |
| - main | |
| env: | |
| REDIS_VERSION: 8.4.0 | |
| jobs: | |
| # TODO: Add another job that will determine which tests to run based on push types and the changes that were made. | |
| check-style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - run: pip install -e .[dev] | |
| - run: scripts/check-prettier.sh | |
| - run: ruff check . | |
| - run: cargo fmt --all -- --check | |
| - run: cargo clippy --workspace -- -D warnings | |
| tests-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - run: python -m pip install --upgrade pip | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: pip install -e .[tests] | |
| - run: pytest tests/ | |
| - run: cargo test --workspace --locked | |
| tests-pass: | |
| needs: | |
| - check-style | |
| - tests-linux | |
| if: (github.repository_owner == 'ccxlv') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "All tests passed ✅" |