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

build.yml « workflows « .github - github.com/gohugoio/go-i18n.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b3d1e9257277f468dc0e4091ebd287fa6b8a3102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build
on:
  - push
  - pull_request
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request'
    steps:
      - name: Install Go
        uses: actions/setup-go@v2
        with:
          go-version: 1.15.2
      - name: Git checkout
        uses: actions/checkout@v2
      - name: Build
        uses: goreleaser/goreleaser-action@v2
        with:
          version: latest
          args: release --rm-dist --snapshot
          workdir: v2
      - name: Test
        working-directory: v2
        run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
      - name: Upload coverage
        uses: codecov/codecov-action@v1
  build_1_9_7:
    name: Build with Go 1.9.7
    runs-on: ubuntu-latest
    if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request'
    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 ./...