Skip to content

stitch redesign tmp #988

stitch redesign tmp

stitch redesign tmp #988

Workflow file for this run

name: PyChunkedGraph
on:
push:
branches:
- "main"
- "pcgv3"
pull_request:
branches:
- "main"
- "pcgv3"
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
load: true
tags: seunglab/pychunkedgraph:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run tests with coverage
run: |
docker run --name pcg-tests seunglab/pychunkedgraph:${{ github.sha }} \
/bin/sh -c "pytest --cov-config .coveragerc --cov=pychunkedgraph --cov-report=xml:/app/coverage.xml ./pychunkedgraph/tests"
- name: Copy coverage report from container
if: always()
run: docker cp pcg-tests:/app/coverage.xml ./coverage.xml
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
slug: CAVEconnectome/PyChunkedGraph
fail_ci_if_error: true
- name: Cleanup
if: always()
run: docker rm pcg-tests || true