-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Run integration tests with all supported git versions #2754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
956399a
f4ada53
82b3803
1d96ade
ea0baf5
1827380
30ce7c8
85f7aa9
62ab41c
adce8ad
d71f5d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
GOFLAGS: -mod=vendor | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
|
@@ -47,13 +47,47 @@ jobs: | |
run: | | ||
go test ./... -short | ||
integration-tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
git-version: | ||
- 2.20.0 # oldest supported version | ||
- 2.22.5 | ||
- 2.23.0 | ||
- 2.25.1 | ||
- 2.30.8 | ||
- latest # We rely on github to have the latest version installed on their VMs | ||
runs-on: ubuntu-latest | ||
name: "Integration Tests" | ||
name: "Integration Tests - git ${{matrix.git-version}}" | ||
env: | ||
GOFLAGS: -mod=vendor | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Restore Git cache | ||
if: matrix.git-version != 'latest' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the idea that the latest git version is already installed? If so could you leave a comment to that effect? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We know that some git version must already be installed, because before this branch we didn't bother installing git at all. So this relies on the assumption that github's CI VMs are up to date wrt which git version they have. (I added the print git version step specifically so that we can verify this.) At the moment it is the current one. In an earlier iteration of the branch I had an entry in the matrix for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK; I added a comment in 50c975b. Gonna rebase one more time now and then merge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good |
||
id: cache-git-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/git-${{matrix.git-version}} | ||
key: ${{runner.os}}-git-${{matrix.git-version}} | ||
- name: Build Git ${{matrix.git-version}} | ||
if: steps.cache-git-restore.outputs.cache-hit != 'true' && matrix.git-version != 'latest' | ||
run: > | ||
sudo apt-get update && sudo apt-get install --no-install-recommends -y build-essential ca-certificates curl gettext libexpat1-dev libssl-dev libz-dev openssl | ||
&& curl -sL "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${{matrix.git-version}}.tar.xz" -o - | tar xJ -C "$HOME" | ||
&& cd "$HOME/git-${{matrix.git-version}}" | ||
&& ./configure | ||
&& make -j | ||
- name: Install Git ${{matrix.git-version}} | ||
if: matrix.git-version != 'latest' | ||
run: sudo make -C "$HOME/git-${{matrix.git-version}}" -j install | ||
- name: Save Git cache | ||
if: steps.cache-git-restore.outputs.cache-hit != 'true' && matrix.git-version != 'latest' | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: ~/git-${{matrix.git-version}} | ||
key: ${{runner.os}}-git-${{matrix.git-version}} | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
|
@@ -67,17 +101,19 @@ jobs: | |
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test | ||
restore-keys: | | ||
${{runner.os}}-go- | ||
- name: Print git version | ||
run: git --version | ||
- name: Test code | ||
run: | | ||
go test pkg/integration/clients/*.go | ||
./scripts/run_integration_tests.sh | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GOFLAGS: -mod=vendor | ||
GOARCH: amd64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
|
@@ -113,7 +149,7 @@ jobs: | |
GOARCH: amd64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
|
@@ -147,7 +183,7 @@ jobs: | |
GOFLAGS: -mod=vendor | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to increase our discipline around flakiness because now there's 6 runs of each test!