Skip to content

Commit

Permalink
✨ add macos to ci
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Apr 29, 2024
1 parent 87437aa commit 2bb8451
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,31 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
tool: ["podman", "docker"]
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Setup Homebrew
if: matrix.tool == 'podman'
if: matrix.tool == 'podman' && matrix.os == 'ubuntu-latest'
uses: Homebrew/actions/setup-homebrew@master

- name: Setup podman
if: matrix.tool == 'podman'
run: |
sudo apt-get install -y ansible
export DEB=$(curl -s https://passt.top/builds/latest/x86_64/ | grep deb | awk -F '"' '{ print $4}')
sudo ansible -m apt -a deb=https://passt.top/builds/latest/x86_64/${DEB} localhost
sudo apt-get remove podman crun
brew install crun podman
case ${{ matrix.os }} in
macos-latest)
brew install --cask podman-desktop
open /Applications/Docker.app
until docker info; do sleep 1; done
;;
ubuntu-latest)
sudo apt-get install -y ansible
export DEB=$(curl -s https://passt.top/builds/latest/x86_64/ | grep deb | awk -F '"' '{ print $4}')
sudo ansible -m apt -a deb=https://passt.top/builds/latest/x86_64/${DEB} localhost
sudo apt-get remove podman crun
brew install crun podman
;;
esac
- name: Extract pull request number from inputs or PR description
run: |
Expand Down Expand Up @@ -78,7 +88,6 @@ jobs:
RUNNER_IMG: localhost/kantra:latest
PODMAN_BIN: ${{ matrix.tool }}

# TODO (pgaikwad): Change this to a yaml test and run `kantra test`
- name: Fail if analysis output does not match expected
run: |
sudo chmod 777 ./output/output.yaml ./output/dependencies.yaml
Expand Down

0 comments on commit 2bb8451

Please sign in to comment.