Skip to content

Commit

Permalink
Fix #26: Add support for running the action multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-carlborg committed Dec 8, 2023
1 parent bc175da commit 326cf75
Show file tree
Hide file tree
Showing 14 changed files with 703 additions and 184 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -354,3 +354,45 @@ jobs:

- name: Run after
run: ${{ matrix.data.run_after }}

multiple-steps:
timeout-minutes: 5
name: Test running the action multiple times
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
hypervisor: [qemu, xhyve]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Run action first time
uses: ./
with:
operating_system: freebsd
architecture: x86-64
version: '13.2'
hypervisor: ${{ matrix.hypervisor }}
shutdown_vm: false
run: touch foo.txt

- name: Verify VM is still running
run: ps aux | grep -v grep | grep -q -v qemu

- name: Verify file is synced back
run: test -f foo.txt

- name: Run action second time
uses: ./
with:
operating_system: freebsd
architecture: x86-64
version: '13.2'
hypervisor: qemu
shutdown_vm: false
run: test -f foo.txt
2 changes: 2 additions & 0 deletions changelog.md
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- Added support for using the action in multiple steps in the same job ([#26](https://github.com/cross-platform-actions/action/issues/26)).

- Added support for specifying that the VM should not shutdown after the action
has run. This adds a new input parameter: `shutdown_vm`. When set to `false`,
this will hopefully mitigate very frequent freezing of VM during teardown ([#61](https://github.com/cross-platform-actions/action/issues/61), [#72](https://github.com/cross-platform-actions/action/issues/72)).
Expand Down

0 comments on commit 326cf75

Please sign in to comment.