fix a bug when the synchronizer was closed but still has some elements and one where we would not end a pledge in case of failure #16
This file contains hidden or 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: build-nix | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: nixos/nix:latest | |
| steps: | |
| - name: test | |
| run: | | |
| set -x | |
| # GitHub sucks | |
| export HOME=/root | |
| cd $HOME | |
| git clone https://github.com/${{ github.repository }}.git | |
| cd $(basename ${{ github.repository }}) | |
| echo "github.event_name is ${{ github.event_name }}" | |
| # fetch the current PR/branch | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| echo "Fetching PR branch" | |
| git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} | |
| git checkout pr-${{ github.event.pull_request.number }} | |
| else | |
| echo "Fetching current branch" | |
| git checkout ${{ github.ref_name }} | |
| fi | |
| git submodule update --init --recursive | |
| set -x | |
| nix-shell --run " | |
| dune build @install && | |
| dune runtest | |
| " |