Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/go-i18n.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Snyder <nickdsnyder@gmail.com>2020-09-28 23:17:55 +0300
committerGitHub <noreply@github.com>2020-09-28 23:17:55 +0300
commit51d732d755110580ba4b07024165b43c9a60882a (patch)
tree54a291703d608789b87e88872efa7d2a5c2f0c73
parent949485dac070df78fc9b06c9758facf6c41a6470 (diff)
Build with GitHub actions (#224)
-rw-r--r--.github/workflows/build.yml40
-rw-r--r--.travis.yml22
-rw-r--r--README.md2
-rw-r--r--v2/go.mod4
-rw-r--r--v2/i18n/bundle.go2
5 files changed, 44 insertions, 26 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..c3cf9ff
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,40 @@
+name: Build
+on:
+ - push
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: Build
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.15.2
+ - name: Git checkout
+ uses: actions/checkout@v2
+ - name: Build and test
+ working-directory: v2
+ run: |
+ go get -t ./...
+ go test -race -coverprofile=coverage.txt -covermode=atomic ./...
+ - name: Upload coverage
+ uses: codecov/codecov-action@v1
+ build_1_9_7:
+ runs-on: ubuntu-latest
+ name: Build with Go 1.9.7
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.9.7
+ - name: Git checkout
+ uses: actions/checkout@v2
+ with:
+ path: gopath/src/github.com/nicksnyder/go-i18n
+ - name: Build and test
+ working-directory: gopath/src/github.com/nicksnyder/go-i18n/v2
+ env:
+ GOPATH: ${{ github.workspace }}/gopath
+ run: |
+ go get -t ./...
+ go test -race ./...
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 32cc103..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-language: go
-
-matrix:
- include:
- - go: 1.9.x
- env: GO111MODULE=on
- - go: 1.x
- env: GO111MODULE=on LATEST=true COVER='-coverprofile=coverage.txt -covermode=atomic'
-
-script:
- - cd v2; go test -race $COVER ./...
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-
-deploy:
-- provider: script
- skip_cleanup: true
- script: rm ../go.mod; curl -sL https://git.io/goreleaser | bash
- on:
- tags: true
- condition: $LATEST = true
diff --git a/README.md b/README.md
index 2d851a0..fa56cc7 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# go-i18n [![Build Status](https://travis-ci.org/nicksnyder/go-i18n.svg?branch=master)](http://travis-ci.org/nicksnyder/go-i18n) [![Report card](https://goreportcard.com/badge/github.com/nicksnyder/go-i18n)](https://goreportcard.com/report/github.com/nicksnyder/go-i18n) [![codecov](https://codecov.io/gh/nicksnyder/go-i18n/branch/master/graph/badge.svg)](https://codecov.io/gh/nicksnyder/go-i18n) [![Sourcegraph](https://sourcegraph.com/github.com/nicksnyder/go-i18n/-/badge.svg)](https://sourcegraph.com/github.com/nicksnyder/go-i18n?badge)
+# go-i18n ![Build status](https://github.com/nicksnyder/go-i18n/workflows/Build/badge.svg) [![Report card](https://goreportcard.com/badge/github.com/nicksnyder/go-i18n)](https://goreportcard.com/report/github.com/nicksnyder/go-i18n) [![codecov](https://codecov.io/gh/nicksnyder/go-i18n/branch/master/graph/badge.svg)](https://codecov.io/gh/nicksnyder/go-i18n) [![Sourcegraph](https://sourcegraph.com/github.com/nicksnyder/go-i18n/-/badge.svg)](https://sourcegraph.com/github.com/nicksnyder/go-i18n?badge)
go-i18n is a Go [package](#package-i18n) and a [command](#command-goi18n) that helps you translate Go programs into multiple languages.
diff --git a/v2/go.mod b/v2/go.mod
index 4b27a8e..bd92c7c 100644
--- a/v2/go.mod
+++ b/v2/go.mod
@@ -1,5 +1,7 @@
module github.com/nicksnyder/go-i18n/v2
+go 1.9
+
require (
github.com/BurntSushi/toml v0.3.0
golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284 // indirect
@@ -9,5 +11,3 @@ require (
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c // indirect
gopkg.in/yaml.v2 v2.2.1
)
-
-go 1.9
diff --git a/v2/i18n/bundle.go b/v2/i18n/bundle.go
index 62bcd43..6c6f5ce 100644
--- a/v2/i18n/bundle.go
+++ b/v2/i18n/bundle.go
@@ -26,7 +26,7 @@ type Bundle struct {
matcher language.Matcher
}
-// artTag is the language tag used for artifical languages
+// artTag is the language tag used for artificial languages
// https://en.wikipedia.org/wiki/Codes_for_constructed_languages
var artTag = language.MustParse("art")