diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6cca7d4..d1a7c89 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,13 +17,13 @@ jobs: package: runs-on: ubuntu-latest steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: filter: blob:none fetch-depth: 0 persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 + uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 - name: Build package run: uv build - name: Check package diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 159ba8c..027201b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,16 +18,16 @@ jobs: contents: read id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: filter: blob:none fetch-depth: 0 persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 + uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 with: enable-cache: false - name: Build package run: uv build - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0075425..3656e3b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,13 +26,13 @@ jobs: outputs: envs: ${{ steps.get-envs.outputs.envs }} steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: filter: blob:none fetch-depth: 0 persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 + uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 - name: Get test environments id: get-envs run: | @@ -65,13 +65,13 @@ jobs: continue-on-error: ${{ contains(matrix.env.name, 'pre') }} # make "all-green" pass even if pre-release job fails steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: filter: blob:none fetch-depth: 0 persist-credentials: false - name: Install uv - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 + uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 with: python-version: ${{ matrix.env.python }} - name: create hatch environment @@ -91,7 +91,7 @@ jobs: uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload - name: Upload coverage - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: fail_ci_if_error: true use_oidc: true @@ -106,6 +106,6 @@ jobs: - test runs-on: ubuntu-latest steps: - - uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 + - uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0 with: jobs: ${{ toJSON(needs) }} diff --git a/tests/conftest.py b/tests/conftest.py index 24da045..588b5a0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -57,11 +57,17 @@ def adata() -> ad.AnnData: @pytest.fixture(scope="session") -def codex_adata() -> ad.AnnData: - """Load the two CODEX samples shared by the graph and shape tests.""" +def _codex_adata() -> ad.AnnData: + """Load the two CODEX samples once per test session.""" return _load_codex(_CODEX_PATH) +@pytest.fixture() +def codex_adata(_codex_adata: ad.AnnData) -> ad.AnnData: + """Give each test its own copy of the CODEX samples.""" + return _codex_adata.copy() + + def _load_codex(path: Path) -> ad.AnnData: """Download and read the shared fixture without races between pytest workers.""" max_retries = 3