Skip to content

api/bootloader: add HashFirmware and ParseSignedFirmware util functions #145

api/bootloader: add HashFirmware and ParseSignedFirmware util functions

api/bootloader: add HashFirmware and ParseSignedFirmware util functions #145

Workflow file for this run

# See reference docs at
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: ci
on: [push, pull_request]
env:
GO_VERSION: "^1.20"
GOLANGCI_LINT_VERSION: "v1.55.2"
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Clone the repo
uses: actions/checkout@v3
- name: Enable caching
uses: actions/cache@v3
with:
# Increment cache number to invalidate.
key: ${{runner.os}}-cache-1
path: |
~/go/pkg
~/.cache/go-build
~/.cache/golangci-lint
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GO_VERSION}}
# Keep the linter version and its config in .golangci.yml in sync with the app repo at
# https://github.com/digitalbitbox/bitbox-wallet-app/blob/98e815c25950dc7f55a27551d053239e6fd804ca/Makefile#L24
- name: Install golangci-lint
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $HOME $GOLANGCI_LINT_VERSION
- name: Lint
run: ~/golangci-lint run --skip-dirs=cmd/playground,cmd/miniscript
test:
runs-on: ubuntu-22.04
steps:
- name: Clone the repo
uses: actions/checkout@v3
- name: Enable caching
uses: actions/cache@v3
with:
# Increment cache number to invalidate.
key: ${{runner.os}}-cache-1
path: |
~/go/pkg
~/.cache/go-build
~/.cache/golangci-lint
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GO_VERSION}}
- name: Test
run: |
go version
go test ./...
build:
runs-on: ubuntu-22.04
steps:
- name: Clone the repo
uses: actions/checkout@v3
- name: Enable caching
uses: actions/cache@v3
with:
# Increment cache number to invalidate.
key: ${{runner.os}}-cache-1
path: |
~/go/pkg
~/.cache/go-build
~/.cache/golangci-lint
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GO_VERSION}}
- name: Build
run: |
go version
go build ./...