Skip to content

Commit

Permalink
test: fix github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Mitchell <nickm@us.ibm.com>
  • Loading branch information
starpit committed Jul 17, 2024
1 parent 2f2fb38 commit dad9779
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/actions.yml
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:
Expand All @@ -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:
Expand All @@ -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/kind-action@v1.10.0
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 }}"
6 changes: 3 additions & 3 deletions pkg/lunchpail/images/build/podman.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const (
)

func WhichContainerCli() (ContainerCli, error) {
if which.Found("podman") {
return "podman", nil
} else if which.Found("docker") {
if which.Found("docker") {
return "docker", nil
} else if which.Found("podman") {
return "podman", nil
} else {
return "", fmt.Errorf("No container CLI found")
}
Expand Down

0 comments on commit dad9779

Please sign in to comment.