ci: improve caching #965
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| env: | |
| SLOW_MACHINE: 1 | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| id: setup-go | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Download Go modules | |
| shell: bash | |
| if: ${{ steps.setup-go.outputs.cache-hit != 'true' }} | |
| run: go mod download | |
| - name: Build | |
| run: make bins | |
| - name: Test | |
| run: make test | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| test-vector: [bitcoin-cln, bitcoin-lnd, liquid-cln, liquid-lnd, misc-integration, lwk-cln, lwk-lnd] | |
| max-parallel: 12 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - uses: cachix/cachix-action@v16 | |
| with: | |
| name: peerswap | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| useDaemon: true | |
| - name: Build development shell | |
| run: nix develop --profile ./dev-profile | |
| - name: Build test binaries | |
| run: nix develop -c make test-bins | |
| - run: nix develop -c make test-${{matrix.test-vector}} |