aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/git.yml
blob: f89604bceaf9b3d3d62950603c1cb6f32c2e70c2 (plain) (blame)
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
on: [push, pull_request]
name: Git Compatibility
jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        git: [[master, ubuntu-latest], [v2.11.0, ubuntu-latest]]

    runs-on: ${{ matrix.git[1] }}
    env:
        GIT_VERSION: ${{ matrix.git[0] }}
        GIT_DIST_PATH: .git-dist/${{ matrix.git[0] }}

    steps:
    - name: Install Go
      uses: actions/setup-go@v1
      with:
        go-version: 1.14.x

    - name: Checkout code
      uses: actions/checkout@v2

    - name: Install build dependencies
      run: sudo apt-get install gettext

    - name: Git Build
      run: make build-git

    - name: Set Git config
      run: |
        git config --global user.email "gha@example.com"
        git config --global user.name "GitHub Actions"
        export PATH=$GIT_DIST_PATH:$PATH

    - name: Test
      env:
        GIT_EXEC_PATH: ${{ github.workspace }}/${{ env.GIT_DIST_PATH }}
      run: make test-coverage