Skip to content

Test nix with the Issue1049-numpy_2.0.0_breaks_things branch #662

Test nix with the Issue1049-numpy_2.0.0_breaks_things branch

Test nix with the Issue1049-numpy_2.0.0_breaks_things branch #662

Workflow file for this run

---
name: Test Nix
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
name: fipy
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- run: echo "UID=${UID}" >> $GITHUB_ENV
- uses: actions/cache/restore@v3
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os }}-http_cache.sqlite
- run: |
nix develop --command bash -c "python setup.py egg_info && python setup.py test > test.out 2>&1" || true
status=$?
# echo ::set-output name=errors::`cat test.out`
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "text<<$EOF" >> $GITHUB_STEP_SUMMARY
echo "FiPy messages: $(cat test.out)." >> $GITHUB_STEP_SUMMARY
echo "$EOF" >> $GITHUB_STEP_SUMMARY
exit $status
- run: nix develop --command bash -c "py.test --nbval --nbval-sanitize-with examples/sanitize.cfg examples/index.ipynb"
- uses: actions/cache/save@v3
if: always()
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os }}-http_cache.sqlite