forked from ben-z/gh-action-mutex
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.4 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
on:
push:
# branches:
# - main
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
simple_test:
runs-on: ubuntu-latest
name: Simple mutex test
steps:
- uses: actions/checkout@v3
- name: Set up mutex
uses: ./
- run: |
echo "I am protected!"
sleep 5
two_clients_test_client_1:
runs-on: ubuntu-latest
name: Two clients test (client 1)
needs: [simple_test]
steps:
- uses: actions/checkout@v3
- name: Set up mutex
uses: ./
with:
branch: gh-mutex-two-clients-test
force-unlock-timeout: 20
- run: |
echo "I am protected! (Client 1)"
sleep 50
two_clients_test_client_2:
runs-on: ubuntu-latest
name: Two clients test (client 2)
needs: [simple_test]
steps:
- uses: actions/checkout@v3
- name: Set up mutex
uses: ./
with:
branch: gh-mutex-two-clients-test
force-unlock-timeout: 20
- run: |
echo "I am protected! (Client 2)"
sleep 50
debug_test:
runs-on: ubuntu-latest
name: Test the debug flag
needs: [two_clients_test_client_1,two_clients_test_client_2]
steps:
- uses: actions/checkout@v3
- name: Set up mutex
uses: ./
with:
debug: "true"
- run: |
echo "I am protected!"
sleep 5