Test nix with the Issue1049-numpy_2.0.0_breaks_things branch #657
Workflow file for this run
This file contains 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: 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 -c 'import fipy; fipy.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 |