aboutsummaryrefslogblamecommitdiffstats
path: root/.github/workflows/git.yml
blob: bbccaa36be7af3fa4098ab57721103a4a295abf3 (plain) (tree)
1
2
3
4
5
6
7
8
9
                        
                       





                                                                
 












                                                     
 







                                       



                                                                   

                                                        
 
                
                             
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: |
        export GIT_DIST_PATH=.git-dist/${{ matrix.git[0] }}
        export GIT_EXEC_PATH=${{ github.workspace }}/$GIT_DIST_PATH
        export PATH=$GIT_EXEC_PATH:$PATH
        git --exec-path
        git config --global user.email "gha@example.com"
        git config --global user.name "GitHub Actions"
 
    - name: Test
      run: make test-coverage