-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (54 loc) · 1.73 KB
/
tests.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
name: "Testing action-platformsh-url"
on: pull_request
permissions: write-all
jobs:
ok-test:
name: "Testing on a branch that has an active environment"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
id: active_url
with:
PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }}
ENVIRONMENT_NAME: master
ALLOW_CANCEL_CRON: 1
missing-test:
name: "Testing on a branch that does not exist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
id: missing_url
continue-on-error: true
with:
PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }}
ENVIRONMENT_NAME: nonexistent
DEPLOY_WAIT_TIME: 10
- name: Check for failure
if: ${{ steps.missing_url.outcome != 'failure' }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('The test did not fail as expected.')
inactive-test:
name: "Testing on a branch that used to exist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
id: inactive_url
continue-on-error: true
with:
PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }}
ENVIRONMENT_NAME: pr-462
DEPLOY_WAIT_TIME: 30
- name: Check for failure
if: ${{ steps.inactive_url.outcome != 'failure' }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('The test did not fail as expected.')