-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathphp-authentication-integ-tests.yml
More file actions
61 lines (51 loc) · 1.67 KB
/
php-authentication-integ-tests.yml
File metadata and controls
61 lines (51 loc) · 1.67 KB
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
name: PHP authentication integration tests
permissions: {}
on:
workflow_call: {}
workflow_dispatch:
push:
branches: [ main ]
jobs:
create-cluster:
uses: ./.github/workflows/dsql-cluster-create.yml
with:
workflow_name: php-authentication
secrets:
AWS_IAM_ROLE: ${{ secrets.PYTHON_IAM_ROLE }}
permissions:
id-token: write
php-authentication-integ-test:
needs: create-cluster
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Enable pdo_pgsql extension
run: sudo phpenmod pdo_pgsql
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.PYTHON_IAM_ROLE }}
aws-region: ${{ needs.create-cluster.outputs.region }}
- name: Install dependencies
working-directory: ./php/authentication
run: composer install --no-interaction
- name: Run integration tests
working-directory: ./php/authentication
env:
CLUSTER_ENDPOINT: ${{ needs.create-cluster.outputs.cluster-endpoint }}
REGION: ${{ needs.create-cluster.outputs.region }}
run: ./vendor/bin/phpunit
delete-cluster:
if: always() && needs.create-cluster.result == 'success'
needs: [create-cluster, php-authentication-integ-test]
uses: ./.github/workflows/dsql-cluster-delete.yml
with:
cluster-id: ${{ needs.create-cluster.outputs.cluster-id }}
region: ${{ needs.create-cluster.outputs.region }}
secrets:
AWS_IAM_ROLE: ${{ secrets.PYTHON_IAM_ROLE }}
permissions:
id-token: write