-
Notifications
You must be signed in to change notification settings - Fork 415
52 lines (44 loc) · 1.47 KB
/
platform-test-merge-to-main.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
name: Platform Test Merge to Main
on:
push:
branches:
- main
jobs:
run-e2e-tests:
runs-on: ubuntu-latest
name: Full E2E tests
services:
postgres:
image: postgres:11.12-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: flagsmith
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
permissions:
id-token: write
contents: read
steps:
- name: Cloning repo
uses: actions/checkout@v4
- name: Run Local API
id: run-local-api
uses: ./.github/actions/run-local-api
with:
e2e_test_token: some-token
# As per https://stackoverflow.com/q/65497331/421808 172.17.0.1 seems like the only way to resolve host DB
database_url: postgres://postgres:postgres@172.17.0.1:5432/flagsmith
disable_analytics_features: true
- name: Run E2E tests against local
uses: ./.github/actions/e2e-tests
with:
e2e_test_token: some-token
slack_token: ${{ secrets.SLACK_TOKEN }}
environment: local
github_action_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Output API logs
if: failure()
env:
API_CONTAINER_ID: ${{ steps.run-local-api.outputs.containerId }}
run: docker logs $API_CONTAINER_ID