Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemfh committed Oct 25, 2024
1 parent 57922d0 commit 7642eee
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,50 @@ jobs:
echo "I am protected!"
sleep 5
two_clients_test_setup:
runs-on: ubuntu-latest
name: Set up two clients test
needs: [simple_test]
steps:
- uses: actions/checkout@v3
- name: Plant faulty lock (step 1)
run: |
# Prevent dequeue
sed -i "/^ post-entrypoint:/d" ./action.yml
- name: Plant faulty lock (step 2)
uses: ./
with:
branch: gh-mutex-two-clients-test

two_clients_test_client_1:
runs-on: ubuntu-latest
name: Two clients test (client 1)
needs: [simple_test]
needs: [two_clients_test_setup]
steps:
- uses: actions/checkout@v3
- name: Set up mutex
uses: ./
with:
branch: gh-mutex-two-clients-test
force-unlock-timeout: 20
force-unlock-timeout: 21
- run: |
echo "I am protected! (Client 1)"
sleep 50
sleep 20
two_clients_test_client_2:
runs-on: ubuntu-latest
name: Two clients test (client 2)
needs: [simple_test]
needs: [two_clients_test_setup]
steps:
- uses: actions/checkout@v3
- name: Set up mutex
uses: ./
with:
branch: gh-mutex-two-clients-test
force-unlock-timeout: 20
force-unlock-timeout: 21
- run: |
echo "I am protected! (Client 2)"
sleep 50
sleep 20
debug_test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inputs:
required: false
default: 'gh-mutex'
force-unlock-timeout:
description: 'The time in seconds after which the lock is forcefully unlocked'
description: 'The time in seconds after which the queue is forcibly unlocked. If set, should be longer than the max expected run time of the jobs.'
required: false
default: ''
debug:
Expand Down

0 comments on commit 7642eee

Please sign in to comment.