migrate to github

This commit is contained in:
Adrien Marquès 2018-11-13 13:10:55 +01:00
parent b60b03539f
commit 3c0f4e0476
24 changed files with 70 additions and 30 deletions

View File

@ -2,8 +2,10 @@
[![Go version](https://img.shields.io/badge/go_version-1.11-blue.svg)](https://golang.org/doc/go1.11) [![Go version](https://img.shields.io/badge/go_version-1.11-blue.svg)](https://golang.org/doc/go1.11)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Go Report Card](https://goreportcard.com/badge/git.xdrm.io/go/nix-amer)](https://goreportcard.com/report/git.xdrm.io/go/nix-amer) [![Go Report Card](https://goreportcard.com/badge/github.com/xdrm-brackets/nix-amer)](https://goreportcard.com/report/github.com/xdrm-brackets/nix-amer)
[![Go doc](https://godoc.org/git.xdrm.io/go/nix-amer?status.svg)](https://godoc.org/git.xdrm.io/go/nix-amer) [![Coverage Status](https://coveralls.io/repos/github/xdrm-brackets/nix-amer/badge.svg?branch=meta%2Fcircle-ci)](https://coveralls.io/github/xdrm-brackets/nix-amer?branch=meta%2Fcircle-ci)
[![CircleCI Build Status](https://circleci.com/gh/xdrm-brackets/nix-amer.svg?style=shield)](https://circleci.com/gh/xdrm-brackets/nix-amer)
[![Go doc](https://godoc.org/github.com/xdrm-brackets/nix-amer?status.svg)](https://godoc.org/github.com/xdrm-brackets/nix-amer)
```yaml ```yaml
name: nix-amer name: nix-amer
@ -86,7 +88,7 @@ alias name /path/to.file
Create the alias `name` which resolves to the path `/path/to.file`. Create the alias `name` which resolves to the path `/path/to.file`.
> Alias value either for the `set` or `run` command have priority to real file paths. > Alias value either for the `set` or `run` command have priority to real file paths.
@ -130,7 +132,7 @@ Configuration files can be written according to some standards or application-sp
- [yaml](https://en.wikipedia.org/wiki/YAML) with [go-yaml/yaml](https://github.com/go-yaml/yaml). - [yaml](https://en.wikipedia.org/wiki/YAML) with [go-yaml/yaml](https://github.com/go-yaml/yaml).
- [ini](https://en.wikipedia.org/wiki/INI_file) with [go-ini/ini](https://github.com/go-ini/ini). - [ini](https://en.wikipedia.org/wiki/INI_file) with [go-ini/ini](https://github.com/go-ini/ini).
- [nginx configurations](https://docs.nginx.com/nginx/admin-guide/basic-functionality/managing-configuration-files/) with [my own library](https://godoc.org/git.xdrm.io/go/nix-amer/internal/cnf/parser/nginx). - [nginx configurations](https://docs.nginx.com/nginx/admin-guide/basic-functionality/managing-configuration-files/) with [my own library](https://godoc.org/github.com/xdrm-brackets/nix-amer/internal/cnf/parser/nginx).
- _and more to come..._ - _and more to come..._

View File

@ -3,7 +3,7 @@ package main
import ( import (
"flag" "flag"
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/instruction" "github.com/xdrm-brackets/nix-amer/internal/instruction"
) )
// GetArgs manages cli arguments to build executionContext, // GetArgs manages cli arguments to build executionContext,

38
circle.yml Normal file
View File

@ -0,0 +1,38 @@
version: 2
jobs:
build: # runs not using Workflows must have a `build` job as entry point
docker:
- image: circleci/golang
environment: # environment variables for the build itself
GOPATH: /go
TEST_RESULTS: /tmp/test-results
COVER_PROFILE: /tmp/coverage.out
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- run: mkdir -p $TEST_RESULTS # create the test results directory
- restore_cache: # restores saved cache if no changes are detected since last run
keys:
- v1-pkg-cache
- run:
name: Load dependencies
command: go get github.com/mattn/goveralls && go get github.com/go-ini/ini && go get gopkg.in/yaml.v2
- run:
name: Load nix-amer
command: go get github.com/xdrm-brackets/nix-amer
- run:
name: Unit tests
command: go test -v -cover -race -coverprofile=$COVER_PROFILE github.com/xdrm-brackets/nix-amer/...
- run:
name: Update coveralls.io
command: /go/bin/goveralls -coverprofile=$COVER_PROFILE -service=circle-ci -repotoken=$COVERALLS_TOKEN
- store_artifacts: # Upload test summary for display in Artifacts
path: /tmp/test-results
destination: raw-test-output
- store_test_results: # Upload test results for display in Test Summary
path: /tmp/test-results

View File

@ -2,7 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/clifmt" "github.com/xdrm-brackets/nix-amer/internal/clifmt"
) )
func help() { func help() {

View File

@ -2,7 +2,7 @@ package buildfile
import ( import (
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/clifmt" "github.com/xdrm-brackets/nix-amer/internal/clifmt"
) )
// LineError wraps errors with a line index // LineError wraps errors with a line index

View File

@ -4,8 +4,8 @@ import (
"bufio" "bufio"
"errors" "errors"
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/clifmt" "github.com/xdrm-brackets/nix-amer/internal/clifmt"
"git.xdrm.io/go/nix-amer/internal/instruction" "github.com/xdrm-brackets/nix-amer/internal/instruction"
"io" "io"
"strings" "strings"
"time" "time"

View File

@ -2,7 +2,7 @@ package buildfile
import ( import (
"bytes" "bytes"
"git.xdrm.io/go/nix-amer/internal/instruction" "github.com/xdrm-brackets/nix-amer/internal/instruction"
"testing" "testing"
) )

View File

@ -1,7 +1,7 @@
package cnf package cnf
import ( import (
lib "git.xdrm.io/go/nix-amer/internal/cnf/parser/nginx" lib "github.com/xdrm-brackets/nix-amer/internal/cnf/parser/nginx"
"io" "io"
"strings" "strings"
) )

View File

@ -2,7 +2,7 @@ package nginx
import ( import (
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/clifmt" "github.com/xdrm-brackets/nix-amer/internal/clifmt"
) )
// ErrNullReceiver is raised when a null receiver is provided // ErrNullReceiver is raised when a null receiver is provided

View File

@ -2,9 +2,9 @@ package instruction
import ( import (
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
"git.xdrm.io/go/nix-amer/internal/pkg" "github.com/xdrm-brackets/nix-amer/internal/pkg"
"git.xdrm.io/go/nix-amer/internal/ser" "github.com/xdrm-brackets/nix-amer/internal/ser"
) )
// T is the instruction common interface // T is the instruction common interface

View File

@ -2,7 +2,7 @@ package instruction
import ( import (
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/cnf" "github.com/xdrm-brackets/nix-amer/internal/cnf"
"os" "os"
"strings" "strings"
) )

View File

@ -1,6 +1,6 @@
package pkg package pkg
import "git.xdrm.io/go/nix-amer/internal/exec" import "github.com/xdrm-brackets/nix-amer/internal/exec"
type apk struct{ exec exec.Executor } type apk struct{ exec exec.Executor }

View File

@ -1,7 +1,7 @@
package pkg package pkg
import ( import (
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
) )
type aptGet struct{ exec exec.Executor } type aptGet struct{ exec exec.Executor }

View File

@ -1,7 +1,7 @@
package pkg package pkg
import ( import (
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
) )
// DefaultManager if not empty is the default package-manager to use when missing // DefaultManager if not empty is the default package-manager to use when missing

View File

@ -1,6 +1,6 @@
package pkg package pkg
import "git.xdrm.io/go/nix-amer/internal/exec" import "github.com/xdrm-brackets/nix-amer/internal/exec"
type dnf struct{ exec exec.Executor } type dnf struct{ exec exec.Executor }

View File

@ -1,6 +1,6 @@
package pkg package pkg
import "git.xdrm.io/go/nix-amer/internal/exec" import "github.com/xdrm-brackets/nix-amer/internal/exec"
type eopkg struct{ exec exec.Executor } type eopkg struct{ exec exec.Executor }

View File

@ -2,7 +2,7 @@ package pkg
import ( import (
"errors" "errors"
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
) )
// ErrUnknownManager is raised when the asked manager does not exist // ErrUnknownManager is raised when the asked manager does not exist

View File

@ -1,7 +1,7 @@
package pkg package pkg
import ( import (
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
"testing" "testing"
) )

View File

@ -1,6 +1,6 @@
package pkg package pkg
import "git.xdrm.io/go/nix-amer/internal/exec" import "github.com/xdrm-brackets/nix-amer/internal/exec"
type pacman struct{ exec exec.Executor } type pacman struct{ exec exec.Executor }

View File

@ -1,6 +1,6 @@
package pkg package pkg
import "git.xdrm.io/go/nix-amer/internal/exec" import "github.com/xdrm-brackets/nix-amer/internal/exec"
type yum struct{ exec exec.Executor } type yum struct{ exec exec.Executor }

View File

@ -1,7 +1,7 @@
package ser package ser
import ( import (
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
) )
// DefaultManager if not empty is the default service-manager to use when missing // DefaultManager if not empty is the default service-manager to use when missing

View File

@ -2,7 +2,7 @@ package ser
import ( import (
"errors" "errors"
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
) )
// ErrUnknownManager is raised when the asked manager does not exist // ErrUnknownManager is raised when the asked manager does not exist

View File

@ -1,7 +1,7 @@
package ser package ser
import ( import (
"git.xdrm.io/go/nix-amer/internal/exec" "github.com/xdrm-brackets/nix-amer/internal/exec"
) )
type systemd struct{ exec exec.Executor } type systemd struct{ exec exec.Executor }

View File

@ -2,8 +2,8 @@ package main
import ( import (
"fmt" "fmt"
"git.xdrm.io/go/nix-amer/internal/buildfile" "github.com/xdrm-brackets/nix-amer/internal/buildfile"
"git.xdrm.io/go/nix-amer/internal/clifmt" "github.com/xdrm-brackets/nix-amer/internal/clifmt"
"os" "os"
"time" "time"
) )