|
| 1 | +name: LiT setup |
| 2 | +description: Prepare LiT workspace with Loop replaces, caches, and dependencies |
| 3 | +runs: |
| 4 | + using: composite |
| 5 | + steps: |
| 6 | + - name: Clean up runner space |
| 7 | + uses: ./.github/actions/cleanup-space |
| 8 | + |
| 9 | + - name: setup go |
| 10 | + uses: actions/setup-go@v5 |
| 11 | + with: |
| 12 | + go-version: '~${{ env.GO_VERSION }}' |
| 13 | + |
| 14 | + - name: Clone LiT repository |
| 15 | + uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + repository: lightninglabs/lightning-terminal |
| 18 | + ref: ${{ env.LITD_ITEST_BRANCH }} |
| 19 | + path: lightning-terminal |
| 20 | + |
| 21 | + - name: Update go.mod to use the local Loop repository |
| 22 | + working-directory: ./lightning-terminal |
| 23 | + run: | |
| 24 | + go mod edit -replace=github.com/lightninglabs/loop=../ |
| 25 | + go mod edit -replace=github.com/lightninglabs/loop/looprpc=../looprpc |
| 26 | + go mod tidy |
| 27 | + shell: bash |
| 28 | + |
| 29 | + - name: Cache Go modules |
| 30 | + uses: actions/cache@v4 |
| 31 | + with: |
| 32 | + path: | |
| 33 | + ${{ env.GOCACHE }} |
| 34 | + ${{ env.GOPATH }}/pkg/mod |
| 35 | + key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-lit-${{ hashFiles('lightning-terminal/go.sum', 'go.sum') }} |
| 36 | + restore-keys: | |
| 37 | + ${{ runner.os }}-go-${{ env.GO_VERSION }}-lit- |
| 38 | +
|
| 39 | + - name: Install yarn |
| 40 | + run: npm install -g yarn |
| 41 | + shell: bash |
| 42 | + |
| 43 | + - name: setup nodejs |
| 44 | + uses: ./lightning-terminal/.github/actions/setup-node |
| 45 | + with: |
| 46 | + node-version: 16.x |
| 47 | + |
| 48 | + - name: Cache yarn dependencies |
| 49 | + uses: actions/cache@v4 |
| 50 | + with: |
| 51 | + path: | |
| 52 | + ~/.cache/yarn |
| 53 | + lightning-terminal/app/node_modules |
| 54 | + key: ${{ runner.os }}-lit-node16-${{ hashFiles('lightning-terminal/app/yarn.lock') }} |
| 55 | + restore-keys: | |
| 56 | + ${{ runner.os }}-lit-node16- |
| 57 | +
|
| 58 | + - name: install LiT app dependencies |
| 59 | + working-directory: ./lightning-terminal/app |
| 60 | + run: yarn |
| 61 | + shell: bash |
0 commit comments