util/sleep: exclude iOS #227
Workflow file for this run
This file contains 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
# 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@v4 | |
- name: Enable caching | |
uses: actions/cache@v4 | |
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@v4 | |
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/BitBoxSwiss/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@v4 | |
- name: Enable caching | |
uses: actions/cache@v4 | |
with: | |
# Increment cache number to invalidate. | |
key: ${{runner.os}}-cache-1 | |
path: | | |
~/go/pkg | |
~/.cache/go-build | |
~/.cache/golangci-lint | |
- name: Enable simulators caching | |
uses: actions/cache@v4 | |
with: | |
key: ${{runner.os}}-simulators-cache-${{hashFiles('./api/firmware/testdata/simulators.json')}} | |
path: | | |
./api/firmware/testdata/simulators | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
- name: Test | |
run: | | |
go version | |
go test ./... -v | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Clone the repo | |
uses: actions/checkout@v4 | |
- name: Enable caching | |
uses: actions/cache@v4 | |
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@v4 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
- name: Build | |
run: | | |
go version | |
go build ./... |