Skip to content

Commit 5959a75

Browse files
Merge pull request #167 from spf13/improve-ci
Improve CI
2 parents 1f57725 + 111af0b commit 5959a75

5 files changed

Lines changed: 57 additions & 33 deletions

File tree

.github/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[{*.yml,*.yaml}]
2+
indent_size = 2

.github/dependabot.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: gomod
5+
directory: /
6+
labels:
7+
- dependencies
8+
schedule:
9+
interval: daily
10+
11+
- package-ecosystem: github-actions
12+
directory: /
13+
labels:
14+
- dependencies
15+
schedule:
16+
interval: daily

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
# Fail fast is disabled because there are Go version specific features and tests
15+
# that should be able to fail independently.
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
go-version: ['1.16', '1.17', '1.18', '1.19', '1.20']
20+
21+
steps:
22+
- name: Set up Go
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version: ${{ matrix.go }}
26+
27+
- name: Checkout code
28+
uses: actions/checkout@v3
29+
30+
- name: Build
31+
run: go build -v ./...
32+
33+
- name: Test
34+
run: go test -race -v ./...

.github/workflows/go.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
cast
2-
====
3-
[![GoDoc](https://godoc.org/github.com/spf13/cast?status.svg)](https://godoc.org/github.com/spf13/cast)
4-
[![Build Status](https://github.com/spf13/cast/actions/workflows/go.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/go.yml)
1+
# cast
2+
3+
[![Build Status](https://github.com/spf13/cast/actions/workflows/ci.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/ci.yml)
4+
[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast)
5+
![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square)
56
[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast)](https://goreportcard.com/report/github.com/spf13/cast)
67

78
Easy and safe casting from one type to another in Go
@@ -72,4 +73,3 @@ the code for a complete set.
7273
var eight interface{} = 8
7374
cast.ToInt(eight) // 8
7475
cast.ToInt(nil) // 0
75-

0 commit comments

Comments
 (0)