Skip to content

Commit

Permalink
GitHub actions (#13)
Browse files Browse the repository at this point in the history
* GitHub actions

* Always run verify workflow

* Change job name of verify workflow

* Change README badges
  • Loading branch information
relvacode authored Jan 7, 2023
1 parent 7d2b075 commit a1443ee
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Verify

on: [push]

jobs:
go-vet-lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: stable

- name: Verify dependencies
run: go mod verify

- name: Run go vet
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...

- name: Install golint
run: go install golang.org/x/lint/golint@latest

- name: Run golint
run: golint ./...

- name: Run tests
run: go test -race -vet=off -json ./... > TestResults.json

- name: Upload Go test results
uses: actions/upload-artifact@v3
with:
name: Go-test-results
path: TestResults.json
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
A fast ISO8601 date parser for Go

[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/relvacode/iso8601) [![GoDoc](https://godoc.org/github.com/relvacode/iso8601?status.svg)](https://godoc.org/github.com/relvacode/iso8601) [![Build Status](https://travis-ci.org/relvacode/iso8601.svg?branch=master)](https://travis-ci.org/relvacode/iso8601) [![Go Report Card](https://goreportcard.com/badge/github.com/relvacode/iso8601)](https://goreportcard.com/report/github.com/relvacode/iso8601)
[![GoDoc](https://godoc.org/github.com/relvacode/iso8601?status.svg)](https://godoc.org/github.com/relvacode/iso8601) ![Build Status](https://github.com/relvacode/iso8601/actions/workflows/verify.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/relvacode/iso8601)](https://goreportcard.com/report/github.com/relvacode/iso8601)


```
Expand All @@ -14,6 +14,8 @@ This library parses any ISO8601 date into a native Go time object without regula
## Usage

```go
package main

import "github.com/relvacode/iso8601"

// iso8601.Time can be used as a drop-in replacement for time.Time with JSON responses
Expand Down
1 change: 1 addition & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (e *UnexpectedCharacterError) Error() string {
return fmt.Sprintf("iso8601: Unexpected character `%c`", e.Character)
}

// RangeError indicates that a value is not in an expected range.
type RangeError struct {
Value string
Element string
Expand Down

0 comments on commit a1443ee

Please sign in to comment.