Skip to content

Commit

Permalink
feat: support for minikube v1.34.0 (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
manusa authored Oct 1, 2024
1 parent 92af4db commit d50e88b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Test Action
uses: ./
with:
minikube version: v1.33.0
minikube version: v1.34.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate Minikube
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Test Action
uses: ./
with:
minikube version: v1.33.0
minikube version: v1.34.0
kubernetes version: v1.30.0
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Test Action
uses: ./
with:
minikube version: v1.33.0
minikube version: v1.34.0
kubernetes version: v1.29.0
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--addons=registry --addons=metrics-server'
Expand All @@ -85,7 +85,7 @@ jobs:
- name: Test Action
uses: ./
with:
minikube version: v1.33.0
minikube version: v1.34.0
kubernetes version: v1.30.0
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--addons=ingress'
Expand All @@ -110,7 +110,7 @@ jobs:
- name: Test Action
uses: ./
with:
minikube version: v1.33.0
minikube version: v1.34.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
container runtime: ${{ matrix.container_runtime }}
Expand All @@ -135,7 +135,7 @@ jobs:
- name: Test Action
uses: ./
with:
minikube version: v1.33.0
minikube version: v1.34.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate Minikube
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup Minikube
uses: manusa/actions-setup-minikube@v2.11.0
with:
minikube version: 'v1.33.0'
minikube version: 'v1.34.0'
kubernetes version: 'v1.30.0'
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Interact with the cluster
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/install.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('install module test suite', () => {
jest.resetModules();
jest.mock('@actions/core');
jest.mock('@actions/io', () => ({
mkdirP: jest.fn(() => {}),
mv: jest.fn(() => {})
}));
jest.mock('path');
Expand Down
5 changes: 5 additions & 0 deletions src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const install = async (minikube, inputs) => {
core.info('Installing Minikube');
logExecSync(`chmod +x ${minikube}`);
const minikubeDirectory = path.dirname(minikube);
// See https://github.com/kubernetes/minikube/pull/18648
// https://github.com/kubernetes/minikube/issues/15835
// Since v1.34.0 minikube doesn't automatically append .minikube to the MINIKUBE_HOME variable unless the directory exists
// By creating it manually we ensure compatibility with current and legacy versions.
await io.mkdirP(path.join(minikubeDirectory, '.minikube'));
await io.mv(minikube, path.join(minikubeDirectory, 'minikube'));
core.exportVariable('MINIKUBE_HOME', minikubeDirectory);
core.addPath(minikubeDirectory);
Expand Down

0 comments on commit d50e88b

Please sign in to comment.