Skip to content

Commit

Permalink
fixup! 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 7, 2023
1 parent 7d1e0c1 commit 7991dad
Showing 1 changed file with 45 additions and 38 deletions.
83 changes: 45 additions & 38 deletions .github/workflows/ci.yml
Expand Up @@ -355,44 +355,51 @@ 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]
# 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: ps aux | grep -v grep | grep -q -v qemu
#
# - 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

foo:
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: ps aux | grep -v grep | grep -q -v qemu

- name: Run action second time
uses: ./
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
operating_system: freebsd
architecture: x86-64
version: '13.2'
hypervisor: qemu
shutdown_vm: false
run: test -f foo.txt
limit-access-to-actor: true

0 comments on commit 7991dad

Please sign in to comment.