-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (51 loc) · 1.72 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
name: "Testing action-platformsh-url"
on: pull_request
permissions: write-all
jobs:
ok-test:
name: "Testing on a branch that has an active, deployed environment"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }}
ENVIRONMENT_NAME: master
fail-deploy-test:
name: "Testing on a environment that has a failed deployment"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: failed_url
continue-on-error: true
with:
PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }}
ENVIRONMENT_NAME: master
DEPLOY_STATUS_PATH: "/sites/default/files/mock-deploy-status"
- name: Check for failure
if: ${{ steps.failed_url.outcome != 'failure' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('The test did not fail as expected.')
missing-url-test:
name: "Testing on a environment that does not exist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: missing_url
continue-on-error: true
with:
PLATFORMSH_ID: ${{ secrets.TEST_PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.TEST_PLATFORMSH_KEY }}
ENVIRONMENT_NAME: nonexistent
- name: Check for failure
if: ${{ steps.missing_url.outcome != 'failure' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('The test did not fail as expected.')