-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pipeline to test against git latest, 2.34.1, 2.25.1
- Loading branch information
1 parent
2f7a2c7
commit 6e54643
Showing
5 changed files
with
95 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: CI | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-git-native: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run tests git-native | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Git Artifact" | ||
git --version | ||
verbose=true bash _tests.sh || { | ||
exit_code=$? | ||
find . -name run.log | ||
find . -name run.log | xargs -I % cat % | ||
exit $exit_code | ||
} | ||
test-git-alpine-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: | | ||
docker build --build-arg ALPINE_GIT_DOCKER_VERSION=latest -t git-artifact:latest . | ||
docker run --rm -e debug=${debug:-false} -e verbose=true -v $(pwd):/git -v $HOME/.ssh:/root/.ssh git-artifact:latest --version | ||
docker run --rm -e debug=${debug:-false} -e verbose=true -v $(pwd):/git -v $HOME/.ssh:/root/.ssh git-artifact:latest artifact-tests || { | ||
exit_code=$? | ||
find . -name run.log | ||
find . -name run.log | xargs -I % cat % | ||
exit $exit_code | ||
} | ||
test-git-alpine-v2-36-2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: | | ||
git_version=v2.36.2 | ||
docker build --build-arg ALPINE_GIT_DOCKER_VERSION=latest -t git-artifact:${git_version} . | ||
docker run --rm -e debug=${debug:-false} -e verbose=true -v $(pwd):/git -v $HOME/.ssh:/root/.ssh git-artifact:${git_version} --version | ||
docker run --rm -e debug=${debug:-false} -e verbose=true -v $(pwd):/git -v $HOME/.ssh:/root/.ssh git-artifact:${git_version} artifact-tests || { | ||
exit_code=$? | ||
find . -name run.log | ||
find . -name run.log | xargs -I % cat % | ||
exit $exit_code | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG ALPINE_GIT_DOCKER_VERSION=dummy | ||
|
||
FROM alpine/git:${ALPINE_GIT_DOCKER_VERSION} | ||
|
||
RUN apk fix && \ | ||
apk --no-cache --update add bash | ||
|
||
RUN git config --global user.email "[email protected]" | ||
RUN git config --global user.name "Git Artifacts" | ||
|
||
RUN git config --global --add safe.directory /git | ||
|
||
ENV PATH="/git:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_tests.sh |