diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 325579a5bcd2..484dd343a88e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,15 @@ jobs: name: '${{ env.CACHIX_NAME }}' signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix --experimental-features 'nix-command flakes' flake check -L + - run: | + if ! failed=$(nix --experimental-features 'nix-command flakes' build .#nix.python-bindings --keep-failed -L 2>&1 | tee /dev/stderr | grep -oP '(?<=note: keeping build directory '\'').*(?='\'')'; then + echo "artifactPath=$failed" >> $GITHUB_ENV + fi + - uses: actions/upload-artifact@v3 + with: + name: failed-python-bindings + path: ${{ env.artifactPath }} + check_secrets: permissions: diff --git a/python/test.sh b/python/test.sh index ca13ce5f6ead..d02caa5e0528 100644 --- a/python/test.sh +++ b/python/test.sh @@ -1,7 +1,12 @@ +set -x SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "$SCRIPT_DIR"/../tests source init.sh +nix show-config >&2 +which python >&2 +realpath $(which python) >&2 + python "$SCRIPT_DIR"/tests.py