-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nick Mitchell <[email protected]>
- Loading branch information
1 parent
2f2fb38
commit 4d8c831
Showing
9 changed files
with
28 additions
and
34 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Kind | ||
name: CI Tests | ||
|
||
# cancel any prior runs for this workflow and this PR (or branch) | ||
concurrency: | ||
|
@@ -12,15 +12,16 @@ on: | |
branches: [ main ] | ||
|
||
jobs: | ||
testsh: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
ARGS: | ||
- "-e 'test(7.*|8.*)'" # baseline tests | ||
- "-i 'test7.*' -e 'test8.*'" # including only test7* tests (simpler tests) | ||
- "-i 'test8.*' -e 'test7.*'" # including only test8* tests (application tests) | ||
SCRIPT: | ||
- ./tests/bin/ci.sh -e 'test(7.*|8.*)' # baseline tests | ||
- ./tests/bin/ci.sh -i 'test7.*' -e 'test8.*' # including only test7* tests (simpler tests) | ||
- ./tests/bin/ci.sh -i 'test8.*' -e 'test7.*' # including only test8* tests (application tests) | ||
- ./tests/bin/go.sh | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
|
@@ -34,22 +35,10 @@ jobs: | |
- name: Setup | ||
run: ./tests/bin/travis/setup.sh | ||
|
||
- name: Run Test with args ${{ matrix.ARGS }} | ||
run: bash -c "./tests/bin/ci.sh ${{matrix.ARGS }}" | ||
|
||
gosh: | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check Docker | ||
run: docker version && podman version | ||
|
||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
with: | ||
install_only: true | ||
|
||
- name: Setup | ||
run: ./tests/bin/travis/setup.sh | ||
|
||
- name: Run Go Tests | ||
run: ./tests/bin/go.sh | ||
- name: Run Test with args ${{ matrix.ARGS }} | ||
env: | ||
TERM: xterm-256color | ||
run: bash -c "${{matrix.SCRIPT}} ${{matrix.ARGS }}" |
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 |
---|---|---|
|
@@ -34,8 +34,10 @@ func copyAppIntoTemplate(appname, sourcePath, templatePath, branch string, verbo | |
fmt.Fprintf(os.Stderr, "Copying app templates into %s\n", appdir) | ||
} | ||
|
||
if strings.HasPrefix(sourcePath, "git@") { | ||
if os.Getenv("CI") != "" && os.Getenv("AI_FOUNDATION_GITHUB_USER") != "" { | ||
isGitSsh := strings.HasPrefix(sourcePath, "git@") | ||
isGitHttp := !isGitSsh && strings.HasPrefix(sourcePath, "https:") | ||
if isGitSsh || isGitHttp { | ||
if isGitSsh && os.Getenv("CI") != "" && os.Getenv("AI_FOUNDATION_GITHUB_USER") != "" { | ||
// [email protected]:user/repo.git -> https://patuser:[email protected]/user/repo.git | ||
pattern := regexp.MustCompile("^git@([^:]+):([^/]+)/([^.]+)[.]git$") | ||
// apphttps := $(echo $appgit | sed -E "s#^git\@([^:]+):([^/]+)/([^.]+)[.]git\$#https://${AI_FOUNDATION_GITHUB_USER}:${AI_FOUNDATION_GITHUB_PAT}@\1/\2/\3.git#") | ||
|
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
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