Skip to content

ci: improve caching #960

ci: improve caching

ci: improve caching #960

Workflow file for this run

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 }}
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v16
with:
name: peerswap
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
useDaemon: true
skipPush: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
- name: Build test binaries
run: nix-shell --run "make test-bins"
- run: nix-shell --run "make test-${{matrix.test-vector}}"