try again #1297
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
git-version: [latest, 2.37.0] | |
include: | |
- os: ubuntu-latest | |
git-version: 2.20.0 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install old git version (macOS) | |
if: ${{ matrix.os == 'macos-latest' && matrix.git-version != 'latest'}} | |
run: | | |
brew tap-new mob/local-git | |
brew extract --version=${{ matrix.git-version }} git mob/local-git | |
brew install git@${{ matrix.git-version }} || brew link --overwrite git@${{ matrix.git-version }} | |
- name: Install old git version (ubuntu) | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.git-version != 'latest'}} | |
run: | | |
sudo apt-get update | |
sudo apt-get install gettext asciidoc docbook2x | |
curl https://mirrors.edge.kernel.org/pub/software/scm/git/git-${{ matrix.git-version }}.tar.gz --output git-${{ matrix.git-version }}.tar.gz | |
tar -zxf git-${{ matrix.git-version }}.tar.gz | |
cd git-${{ matrix.git-version }} | |
make configure | |
./configure --prefix=/usr | |
make all info | |
sudo make install install-info | |
- name: Show git version | |
run: git version | |
- name: Use Go 1.22.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Test | |
run: go test -test.v |