This repository was archived by the owner on Nov 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (53 loc) · 1.98 KB
/
Copy pathtest-integration.yml
File metadata and controls
64 lines (53 loc) · 1.98 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
62
63
64
name: "Integration Tests"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
integration-tests:
name: "PHP 8.3 with Coverage"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build test image
run: |
echo "Building test image with latest code..."
docker buildx build \
--tag evansims/openfga-laravel-integration-tests:latest \
--file Dockerfile.integration \
--load \
.
# Show image info
echo "Built test image:"
docker images evansims/openfga-laravel-integration-tests:latest --format "Repository: {{.Repository}} Size: {{.Size}}"
- name: Run integration tests
run: |
# Use the regular compose file with the freshly built image
docker compose -f docker-compose.integration.yml up -d openfga otel-collector
sleep 10
docker compose -f docker-compose.integration.yml run --rm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
files: ./coverage/cobertura.xml
fail_ci_if_error: true
- name: Upload test results to Codecov
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
file: ./junit.xml
- name: Cleanup
if: always()
run: |
docker compose -f docker-compose.integration.yml down -v
docker ps -a --filter label=com.openfga.test=integration -q | xargs -r docker rm -f || true