Skip to content

Commit 28ff88c

Browse files
authored
Merge pull request #60 from utopia-php/fix-cicd-for-external
Fix: External contribution tests
2 parents 14f3a90 + 60072d8 commit 28ff88c

2 files changed

Lines changed: 48 additions & 3 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Tests (External)"
2+
3+
on:
4+
pull_request_target:
5+
types: [labeled]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
tests:
12+
name: Tests (External)
13+
runs-on: ubuntu-latest
14+
15+
if: github.event.label.name == 'test'
16+
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
23+
- name: Start Test Stack
24+
env:
25+
TESTS_GITHUB_PRIVATE_KEY: ${{ secrets.TESTS_GITHUB_PRIVATE_KEY }}
26+
TESTS_GITHUB_APP_IDENTIFIER: ${{ secrets.TESTS_GITHUB_APP_IDENTIFIER }}
27+
TESTS_GITHUB_INSTALLATION_ID: ${{ secrets.TESTS_GITHUB_INSTALLATION_ID }}
28+
run: |
29+
docker compose up -d
30+
sleep 15
31+
32+
- name: Doctor
33+
run: |
34+
docker compose logs
35+
docker ps
36+
docker network ls
37+
38+
- name: Run Tests
39+
run: |
40+
docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml tests

.github/workflows/tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
name: "Tests"
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
49
jobs:
510
tests:
611
name: Tests
712
runs-on: ubuntu-latest
813

914
steps:
1015
- name: Check out the repo
11-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1217

1318
- name: Start Test Stack
1419
env:
@@ -27,4 +32,4 @@ jobs:
2732
2833
- name: Run Tests
2934
run: |
30-
docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml tests
35+
docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml tests

0 commit comments

Comments
 (0)