Skip to content

Commit 6cfef2b

Browse files
committed
chore(CI): Reworked test env
1 parent f8cb4f6 commit 6cfef2b

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
php: ['8.1', '8.2', '8.3', '8.4', '8.5']
25+
php: ["8.1", "8.2", "8.3", "8.4", "8.5"]
2626

2727
steps:
2828
- name: Checkout
@@ -60,3 +60,44 @@ jobs:
6060
files: build/coverage.xml
6161
fail_ci_if_error: true
6262
token: ${{ secrets.CODECOV_TOKEN }}
63+
64+
integration-live:
65+
name: Integration (live RNIDS)
66+
runs-on: ubuntu-latest
67+
needs: unit-tests
68+
if: ${{ secrets.RNIDS_EPP_USER != '' && secrets.RNIDS_EPP_PASS != '' && secrets.RNIDS_EPP_CERT != '' && secrets.RNIDS_EPP_ROOT != '' }}
69+
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
74+
- name: Setup PHP
75+
uses: shivammathur/setup-php@v2
76+
with:
77+
php-version: "8.1"
78+
79+
- name: Cache Composer dependencies
80+
uses: actions/cache@v4
81+
with:
82+
path: ~/.composer/cache/files
83+
key: ${{ runner.os }}-php-8.1-composer-${{ hashFiles('**/composer.lock') }}
84+
restore-keys: |
85+
${{ runner.os }}-php-8.1-composer-
86+
87+
- name: Install dependencies
88+
run: composer install --prefer-dist --no-progress --no-interaction
89+
90+
- name: Prepare RNIDS certificate fixtures
91+
run: |
92+
mkdir -p tests/fixtures
93+
printf '%s' '${{ secrets.RNIDS_EPP_CERT }}' > tests/fixtures/client.pem
94+
printf '%s' '${{ secrets.RNIDS_EPP_ROOT }}' > tests/fixtures/root.pem
95+
chmod 600 tests/fixtures/client.pem tests/fixtures/root.pem
96+
97+
- name: Run live integration tests
98+
env:
99+
RNIDS_EPP_USERNAME: ${{ secrets.RNIDS_EPP_USER }}
100+
RNIDS_EPP_PASSWORD: ${{ secrets.RNIDS_EPP_PASS }}
101+
RNIDS_EPP_CLIENT_CERT_PATH: tests/fixtures/client.pem
102+
RNIDS_EPP_CA_CERT_PATH: tests/fixtures/root.pem
103+
run: composer test:live

0 commit comments

Comments
 (0)