Skip to content

Commit

Permalink
Travis -> GH Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Pipes <[email protected]>
  • Loading branch information
jaypipes committed Mar 24, 2022
1 parent 2cf2b31 commit d9773c6
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 26 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: CI tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
jobs:
# tier 0: system-independent checks
format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: set up golang
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: format
run: ./hack/check-format.sh

lint:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Verify
uses: golangci/golangci-lint-action@v2
with:
version: v1.41.1
args: --timeout=15m0s --verbose

build-ubuntu-2004:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.15', '1.16', '1.17' ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: run unit-tests
run: go test -v ./...

build-windows-2019:
runs-on: windows-2019
strategy:
matrix:
go: [ '1.16' ]
steps:
- uses: actions/checkout@v2

- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: run unit-tests
env:
PCIDB_ENABLE_NETWORK_FETCH: "1"
run: go test -v ./...

build-macos-1015:
runs-on: macos-10.15
strategy:
matrix:
go: [ '1.16' ]
steps:
- uses: actions/checkout@v2

- name: set up go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: run unit-tests
run: go test -v ./...
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# `pcidb` - the Golang PCI DB library [![Build Status](https://travis-ci.com/jaypipes/pcidb.svg?branch=master)](https://travis-ci.com/jaypipes/pcidb)
# `pcidb` - the Golang PCI DB library

[![Build Status](https://github.com/jaypipes/pcidb/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/jaypipes/pcidb/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/jaypipes/pcidb)](https://goreportcard.com/report/github.com/jaypipes/pcidb)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)

`pcidb` is a small Golang library for programmatic querying of PCI vendor,
product and class information.

We currently [test](https://travis-ci.com/jaypipes/pcidb/) `pcidb` on Linux, Windows and MacOSX.
We currently test `pcidb` on Linux, Windows and MacOSX.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/jaypipes/pcidb

go 1.15
go 1.17

require github.com/mitchellh/go-homedir v1.0.0

0 comments on commit d9773c6

Please sign in to comment.