Skip to content

Commit

Permalink
build: Test against Go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi committed Apr 26, 2024
1 parent 25f2b70 commit c657292
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,38 @@ name: Build and Test
on: [push, pull_request]
permissions:
contents: read

jobs:
build-go:
build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.20', '1.21']
go: ['1.21', '1.22']
steps:
- uses: awalsh128/cache-apt-pkgs-action@1850ee53f6e706525805321a3f2f863dcf73c962 #v1.3.0
- name: Check out source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.0-dev
version: 1.0
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 #v5.0.0
with:
go-version: ${{ matrix.go }}

- name: Check out source
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- name: Install Linters
run: "go install github.com/golangci/golangci-lint/cmd/[email protected]"

- uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad #v1.4.2
with:
fetch-depth: 0
packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.0-dev
version: 1.0

# Restore original file modification times for test cache reasons
- name: restore timestamps
run: git restore-mtime
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2"
- name: Use test and module cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: |
~/.cache/go-build
Expand All @@ -39,17 +42,14 @@ jobs:
restore-keys: go-test-${{ matrix.go }}

- name: Test
env:
GO111MODULE: "on"
run: |
./run_tests.sh
run: ./run_tests.sh

lint-docs:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- uses: DavidAnson/markdownlint-cli2-action@3aaa38e446fbd2c288af4291aa0f55d64651050f #v12.0.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 #v16.0.0
continue-on-error: true
with:
globs: |
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# libwallet
libwallet

Check failure on line 1 in README.md

View workflow job for this annotation

GitHub Actions / Lint Markdown

First line in a file should be a top-level heading

README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "libwallet"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md041.md
---------

libwallet is a go library for dcr. It includes features for creating new wallets,
[![Build Status](https://github.com/decred/libwallet/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/libwallet/actions)
[![Blue Oak Model License 1.0.0](https://img.shields.io/badge/license-Blue_Oak-007788.svg)](https://blueoakcouncil.org/license/1.0.0)
[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/libwallet)

libwallet is a Go library for dcr. It includes features for creating new wallets,
restoring wallets from seed and synchronizing using SPV (Simple Payment Verification).
SPV is a simple, lightweight but privacy-preserving means of fetching blockchain
information that is relevant to a wallet.

0 comments on commit c657292

Please sign in to comment.